From 2b3eede0b834a82c7dce5ec328f3929c0effc536 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 8 Feb 2001 16:31:20 +0000 Subject: Fixes to new mutex routines and various tests. --- tests/cancel2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/cancel2.c') diff --git a/tests/cancel2.c b/tests/cancel2.c index f64882a..3a7c2c5 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -48,7 +48,7 @@ * Create NUMTHREADS threads in addition to the Main thread. */ enum { - NUMTHREADS = 1 + NUMTHREADS = 4 }; typedef struct bag_t_ bag_t; @@ -76,6 +76,7 @@ mythread(void * arg) assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0); +#if 0 switch (bag->threadnum % 2) { case 0: @@ -87,6 +88,10 @@ mythread(void * arg) result = 1; break; } +#else + assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0); + result = 1; +#endif #if defined(_MSC_VER) && !defined(__cplusplus) __try -- cgit v1.2.3