summaryrefslogtreecommitdiff
path: root/tests/cancel2.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-02-08 16:31:20 +0000
committerrpj <rpj>2001-02-08 16:31:20 +0000
commit2b3eede0b834a82c7dce5ec328f3929c0effc536 (patch)
tree24414750f16e0c7bc7d231139d7f20a76b512ae4 /tests/cancel2.c
parent3c0fbfafe563b7b312d60c42c0d58a3a1f4d5930 (diff)
Fixes to new mutex routines and various tests.exp-2001-02-09-passed
Diffstat (limited to 'tests/cancel2.c')
-rw-r--r--tests/cancel2.c7
1 files changed, 6 insertions, 1 deletions
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