Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/semaphore Explicitly terminate threads to prevent ...
details: https://anonhg.NetBSD.org/src/rev/e3d2966cf4fe
branches: trunk
changeset: 763526:e3d2966cf4fe
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Mar 23 13:57:04 2011 +0000
description:
Explicitly terminate threads to prevent crashes on exit.
diffstat:
tests/lib/semaphore/sem.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 99f07c4f7a44 -r e3d2966cf4fe tests/lib/semaphore/sem.c
--- a/tests/lib/semaphore/sem.c Wed Mar 23 13:11:51 2011 +0000
+++ b/tests/lib/semaphore/sem.c Wed Mar 23 13:57:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.7 2010/11/10 11:14:12 pooka Exp $ */
+/* $NetBSD: sem.c,v 1.8 2011/03/23 13:57:04 joerg Exp $ */
/*
* Common code for semaphore tests. This can be included both into
@@ -159,6 +159,9 @@
}
if (i == 1000)
atf_tc_fail("sem destroy not reporting EBUSY");
+
+ pthread_cancel(pt);
+ pthread_join(pt, NULL);
}
ATF_TC(blockwait);
@@ -194,6 +197,9 @@
sem_post(&semmarit[1]);
}
+
+ pthread_cancel(pt);
+ pthread_join(pt, NULL);
}
ATF_TC(named);
Home |
Main Index |
Thread Index |
Old Index