* 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:
@ -366,6 +366,7 @@ public:
|
||||
void *return_ptr;
|
||||
bool valid;
|
||||
bool suspended;
|
||||
bool canceled;
|
||||
int cancelstate, canceltype;
|
||||
_cygtls *cygtls;
|
||||
HANDLE cancel_event;
|
||||
|
Reference in New Issue
Block a user