* thread.h (class pthread): Add bool member canceled.

* thread.cc (pthread::pthread): Initialize canceled to false.
	(pthread::cancel): Set canceled before setting cancel_event.
	(pthread::testcancel): Check for canceled.  Only wait for cancel_event
	if canceled is true.  Explain why.
	(pthread::_fixup_after_fork): Set canceled to false.
This commit is contained in:
Corinna Vinschen
2011-04-30 10:20:25 +00:00
parent e0b0b9e4ff
commit 42faed4128
3 changed files with 23 additions and 3 deletions

View File

@ -366,6 +366,7 @@ public:
void *return_ptr;
bool valid;
bool suspended;
bool canceled;
int cancelstate, canceltype;
_cygtls *cygtls;
HANDLE cancel_event;