summaryrefslogtreecommitdiff
path: root/lib/libpthread/pthread_types.h
diff options
context:
space:
mode:
authornathanw <nathanw@NetBSD.org>2003-01-25 00:47:05 +0000
committernathanw <nathanw@NetBSD.org>2003-01-25 00:47:05 +0000
commit9ff1e2d38522b2004c0a5762192ce2bd3c73f4b6 (patch)
tree6ef06743da9faf20400e3846465db4ed21499339 /lib/libpthread/pthread_types.h
parentfe8e8dad4a892f0dcca519bce3419e4ca080593f (diff)
Make pthread_barrier_wait() handle spurious wakeups from pthread__block()
by adding a generation number to the barrier structure and incrementing it when the barrier fires. XXX this is an ABI change for anything using barriers, but the library is new enough and nothing in the tree uses barriers so I'm going to let it slide. Using the private data pointer for a field that will always be present would be excessive.
Diffstat (limited to 'lib/libpthread/pthread_types.h')
-rw-r--r--lib/libpthread/pthread_types.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libpthread/pthread_types.h b/lib/libpthread/pthread_types.h
index fd9a42b33bb..e25eb69d757 100644
--- a/lib/libpthread/pthread_types.h
+++ b/lib/libpthread/pthread_types.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_types.h,v 1.2 2003/01/18 10:34:17 thorpej Exp $ */
+/* $NetBSD: pthread_types.h,v 1.3 2003/01/25 00:47:05 nathanw Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -224,6 +224,7 @@ struct pthread_barrier_st {
struct pthread_queue_t ptb_waiters;
unsigned int ptb_initcount;
unsigned int ptb_curcount;
+ unsigned int ptb_generation;
void *ptb_private;
};