This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH][BZ #13613] Allow a single-threaded process to cancel itself
On 9 May 2012 21:00, Carlos O'Donell <firstname.lastname@example.org> wrote:
> * After calling pthread_cancel() *all* of the optimizations that could
> have used SINGLE_THREAD_P are not available, not just those related to
This should not make a difference, because a single thread cancelling
itself means that the process will end after unwind. For any
multi-threaded situation this does not make any difference since the
value was already 1.
> * It overloads multiple_threads with a new meaning i.e. "Is true if
> either more than one thread is running or if the one thread called
> pthread_cancel()", which is bad for maintainability.
I agree. I think a union like:
#define multiple_threads cancellation.__multiple_threads
this should work. Let me check.