cvs commit: src/lib/libc/gen sem.c
David Xu
davidxu at freebsd.org
Fri Jan 16 20:49:23 PST 2004
Daniel Eischen wrote:
>On Fri, 16 Jan 2004, David Xu wrote:
>
>
>
>>davidxu 2004/01/16 18:45:37 PST
>>
>> FreeBSD src repository
>>
>> Modified files:
>> lib/libc/gen sem.c
>> Log:
>> Enable cancellation point in sem_wait, it is required by POSIX.
>> For pshared semaphore, this commit still does not enable cancellation
>> point, I think there should be a pthread_enter_cancellation_point_np
>> for libc to implement a safe cancellation point.
>>
>>
>
>Hmm, I'd rather have the threads library provide cancellation
>wrappers for those functions (like the other functions in libc).
>
>
>
I think you either need to reimplement it in libkse or just let libc to
do so,
because it uses conditional variable and mutex, when it is cancelled, it
needs to unlock mutex
and restore waiter counter, a simple wrapper won't work without
corrrupting it's internal state.
David Xu
More information about the cvs-all
mailing list