"J. Johnston" wrote: > > Hello, > > I have built a pth 1.3.7 library to work with the newlib C library. I had to >modify > the configure.in and Makefile.am such that I hard-wired (sjlj, sjlje, sas) and > --enable-pthreads. I had noticed that the test for soft syscalls occurs before > the test for pthreads so enable-pthreads=yes setting enable-soft-syscalls=yes seems > to be too late. > > Nevertheless, I have my build working and I can run the test_pthread.c application > successfully on my i686 Red Hat Linux 7.1. Because I don't have soft syscalls, the > test case runs each thread completely before starting another. I tried manually > compiling the test_pthread.c case with -D_POSIX_THREAD_SYSCALL_SOFT > to see what would happen. When I did, I got the following error: > > main: init > main: initializing attribute object > main: create thread 1 > main: create thread 2 > main: create thread 3 > main: create thread 4 > main: destroying attribute object > child: startup foo > child: startup bar > child: startup baz > child: startup quux > **Pth** SCHEDULER INTERNAL ERROR: no more thread(s) available to schedule!?!? > zsh: abort (core dumped) ./a.out > > Is this a known problem and if so, is there a fix in a subsequent release? I would > have expected the scheduler to be prepared for all threads to be asleep at the same >time. > Is setting the flag at compile-time the wrong thing to do? >
I have found the problem and it is not a problem in the pth library. The select syscall was not waiting for the specified delay so the scheduler got control with nothing in the ready queue. -- Jeff J. ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]