summaryrefslogtreecommitdiff
path: root/pthread_testcancel.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-17 01:38:02 +0000
committerrpj <rpj>2004-05-17 01:38:02 +0000
commit771465fed0cf50ee2dd790723245fc091699c324 (patch)
treed8c18d095a33fe7c4564bd90c5f313bb9e4057dd /pthread_testcancel.c
parent8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff)
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'pthread_testcancel.c')
-rw-r--r--pthread_testcancel.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/pthread_testcancel.c b/pthread_testcancel.c
index 9399267..04c214a 100644
--- a/pthread_testcancel.c
+++ b/pthread_testcancel.c
@@ -68,24 +68,22 @@ pthread_testcancel (void)
* ------------------------------------------------------
*/
{
- pthread_t self = pthread_self();
+ pthread_t self = pthread_self ();
- (void) pthread_mutex_lock(&self->cancelLock);
+ (void) pthread_mutex_lock (&self->cancelLock);
if (self != NULL
&& self->cancelState != PTHREAD_CANCEL_DISABLE
- && WaitForSingleObject (self->cancelEvent, 0) == WAIT_OBJECT_0
- )
+ && WaitForSingleObject (self->cancelEvent, 0) == WAIT_OBJECT_0)
{
/*
* Canceling!
*/
self->state = PThreadStateCanceling;
self->cancelState = PTHREAD_CANCEL_DISABLE;
- (void) pthread_mutex_unlock(&self->cancelLock);
- ptw32_throw(PTW32_EPS_CANCEL);
+ (void) pthread_mutex_unlock (&self->cancelLock);
+ ptw32_throw (PTW32_EPS_CANCEL);
}
- (void) pthread_mutex_unlock(&self->cancelLock);
-} /* pthread_testcancel */
-
+ (void) pthread_mutex_unlock (&self->cancelLock);
+} /* pthread_testcancel */