Has anyone out there implemented a version of pthreads or cthreads
for Solaris 2.3?
On a similar note, does anyone have any idea why I would be getting
a SIGWAITING signal in a daemon process when I have not created any
threads/LWPs yet?
Using adb I can see that there are two threads (LWPs) but I can't
tell what is blocking.
Using gdb I don't get anything more informative either.
Anyone have any ideas?
As you can guess I am porting UNIX (BSD) c/p thread code to Solaris 2.3.
Thanks if you can help,
ADB output:
^^^^^^^^^^
localhost[610]# adb /usr/etc/glued
:r local
SIGWAITING: No runnable lwp
stopped at __sigwait+0xc: ta 0x8
$L
lwpids 1 and 2 are in process 16807
1:l
lwp 1: _thrsys_poll+4: ta 0x8
$c
_thrsys_poll(?) + 4
format_maxlen(0xefffd798,0x2,0xffffffff,0x0,0xefffd798,0x0) + 1324c
_select(?) + 288
_PROCEDURE_LINKAGE_TABLE_(0x400,0xeffffa98,0x2,0x2,0xffffffff,0x10) + 330
svc_run_glue(0x3f1,0x3f1,0x1,0xffffffff,0x3,0x0) + 108
main(0x2,0xeffffba4,0xeffffbb0,0x459c8,0x0,0x0) + 36c
2:l
lwp 2: __sigwait+0xc: ta 0x8
$c
__sigwait(?) + c
_is_fpu_enabled(0x0,0x0,0xef6f5b80,0xef6f1140,0xef6f0b84,0x0) + 1026c
:c
gdb output:
^^^^^^^^^^
localhost[612]# gdb /usr/etc/glued
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.13 (sparc-sun-solaris2.3), Copyright 1994 Free Software Foundation,
Inc...
(gdb) b glue.c:729
Breakpoint 1 at 0x2cbb4: file glue.c, line 729.
(gdb) r
Starting program: /usr/etc/glued
Program received signal SIGWAITING, Process's LWPs are blocked.
0xef6deecc in __sigwait ()
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0xef6deff0 in _thrsys_poll ()
(gdb) bt
#0 0xef6deff0 in _thrsys_poll ()
#1 0xef6defb8 in _poll ()
#2 0xef67e838 in _select ()
#3 0x22b60 in svc_run_glue (maxlisteners=1009) at svc_run.c:425
#4 0x21950 in main (argc=1, argv=0xeffffba8) at glue_main.c:238
(gdb) p errno
$1 = 0
(gdb)
... Department of Mathematics .............................................
... The University of Melbourne ...........................................
... Parkville 3052 Australia ..............................................