Subject: Re: posix semaphores and libpthread
To: Anthony Mallet <email@example.com>
From: Nathan J. Williams <firstname.lastname@example.org>
Date: 02/02/2003 16:04:59
Anthony Mallet <email@example.com> writes:
> I still have some trouble with posix semaphores in libpthread.
> Calling sem_wait when no thread has been created triggers this:
> assertion "next != 0" failed: file "/home/src/netbsd-current/lib/libpthread/pthread_run.c", line 118, function "pthread__next"
> Shoud I send-pr?
> Or am I wrong in trying do to this?
> Or is it a known issue :) ?
This is probably the same problem that affects pthread_cond_wait()
that I fixed recently; the various synchronization routines that can
wait for something to happen all assume that the thread scheduling
infrastructure is up and running, but that doesn't happen until the
second thread (first non-main thread) is created.
So consider it a known bug, andI'll put it on my queue to fix... it
hits enough places that it really needs a more general solution than
what I did to pthread_cond_wait().