- there is no longer any risk of spoofing cancellation requests, since the cancel flag is set in pthread_cancel rather than in the signal handler. - cancellation signal is no longer unblocked when running the cancellation handlers. instead, pthread_create will cause any new threads created from a cancellation handler to unblock their own cancellation signal. - various tweaks in preparation for POSIX timer support.
7 lines
115 B
C
7 lines
115 B
C
#include "pthread_impl.h"
|
|
|
|
int pthread_cancel(pthread_t t)
|
|
{
|
|
t->cancel = 1;
|
|
return pthread_kill(t, SIGCANCEL);
|
|
}
|