Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread In pthread_exit(), clear pt_canceled in addit...
details: https://anonhg.NetBSD.org/src/rev/13a6505bd74e
branches: trunk
changeset: 543293:13a6505bd74e
user: nathanw <nathanw%NetBSD.org@localhost>
date: Sat Feb 22 00:53:29 2003 +0000
description:
In pthread_exit(), clear pt_canceled in addition to setting
PT_FLAG_CS_DISABLED in pt_flags.
Prevents cancellation cleanup handlers from thinking that they've been
canceled and exiting mid-handler. Problem spotted by Matt Thomas.
diffstat:
lib/libpthread/pthread.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 0244589a87fd -r 13a6505bd74e lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c Fri Feb 21 23:55:38 2003 +0000
+++ b/lib/libpthread/pthread.c Sat Feb 22 00:53:29 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread.c,v 1.9 2003/02/15 04:34:40 nathanw Exp $ */
+/* $NetBSD: pthread.c,v 1.10 2003/02/22 00:53:29 nathanw Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -355,6 +355,7 @@
/* Disable cancellability. */
self->pt_flags |= PT_FLAG_CS_DISABLED;
+ self->pt_cancel = 0;
/* Call any cancellation cleanup handlers */
while (!PTQ_EMPTY(&self->pt_cleanup_stack)) {
Home |
Main Index |
Thread Index |
Old Index