[PATCH] pthread cancellation
Thomas Pfaff
tpfaff@gmx.net
Fri Apr 26 01:57:00 GMT 2002
The patch provides a pthread cancellation implementation.
Regards,
Thomas
2002-04-26 Thomas Pfaff <tpfaff@gmx.net>
* include/pthread.h (PTHREAD_CANCELED): Defined a reasonable
value.
* thread.h (pthread::cancel_event): New member.
(__pthread_cancel_self): New prototype.
* thread.cc (pthread::pthread): Initialize cancel_event, changed
initializer for mutex from 0 to PTHREAD_MUTEX_INITIALIZER.
This is required for the main thread.
(pthread::~pthread): Close cancel_event if needed.
(pthread::create): Create cancel_event, stop thread creation if
not sucessfull.
(__pthread_cancel): Added support for deferred and asynchronous
cancellation.
(__pthread_cancel_self): New function.
(__pthread_setcancelstate): Added lock for race with
__pthread_cancel, check if oldstate == NULL.
(__pthread_setcanceltype): Added lock for race with
__pthread_cancel, check if oldtype == NULL.
(__pthread_testcancel): Added support for deferred cancellation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_cancel.patch
Type: application/octet-stream
Size: 7728 bytes
Desc:
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020426/7e86b7d5/attachment.obj>
More information about the Cygwin-patches
mailing list