This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] pthread cancellation

The patch provides a pthread cancellation implementation.


2002-04-26  Thomas Pfaff  <>

	* include/pthread.h (PTHREAD_CANCELED): Defined a reasonable
	* thread.h (pthread::cancel_event): New member.
	(__pthread_cancel_self): New prototype.
	* (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
	(__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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]