From 771465fed0cf50ee2dd790723245fc091699c324 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 17 May 2004 01:38:02 +0000 Subject: re-indentation, bug fixes, hooks for pre-emptive async cancelation --- pthread_testcancel.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'pthread_testcancel.c') 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 */ -- cgit v1.2.3