The patch provides a pthread cancellation implementation.

Regards,
Thomas

2002-04-26  Thomas Pfaff  <[EMAIL PROTECTED]>

        * 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.


Attachment: pthread_cancel.patch
Description: Binary data

Reply via email to