[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: sem_post



> > I looked into sem_post() in nptl-0.5, I found it is not reentrant.
> 
> What do you mean by that?  You cannot compare this code with the old
> implementation.  What *exactly* do you think is not working?

Here is the word from Solaris man page, since I don't have posix standard
around.

"The sem_post() function is reentrant with respect to signals and may be invoked from a signal-catching function."

Assume a thread calls sem_post(), and acquires lll_lock(). Before it
calls lll_sem_post(), it receives a signal, and inside signal handler,
it calls sem_post() again. According to posix, this code is legal.

Hong





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]