diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-05-26 00:08:03 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-05-26 00:08:03 +0000 |
commit | e0d576b0027595335bdcebdd114b5d4030eb785c (patch) | |
tree | bff774e3987792e37c0e68c153f987bffb7a5e13 | |
parent | b7ed98d9fc56380c7fdc473cfeedbff97a4e4972 (diff) |
count and chec the number of times the self-cancelling thread tries to cancel itself
-rw-r--r-- | lib/libc_r/TEST/test_cancel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/TEST/test_cancel.c b/lib/libc_r/TEST/test_cancel.c index fe8aa18a8fa..570ea90e1ad 100644 --- a/lib/libc_r/TEST/test_cancel.c +++ b/lib/libc_r/TEST/test_cancel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_cancel.c,v 1.2 1999/03/10 09:23:55 d Exp $ */ +/* $OpenBSD: test_cancel.c,v 1.3 1999/05/26 00:08:02 d Exp $ */ /* David Leonard <d@openbsd.org>, 1999. Public Domain. */ #include <pthread.h> @@ -70,6 +70,7 @@ c2handler(void *arg) v(); } +static int message_seen = 0; void * child2fn(arg) void *arg; @@ -105,7 +106,9 @@ child2fn(arg) c2_in_test = 1; pthread_testcancel(); printf("you should see this message exactly once\n"); + message_seen++; c2_in_test = 0; + ASSERT(message_seen == 1); } PANIC("child 2"); } |