summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/pthread_private.h
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-12-11 00:19:48 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-12-11 00:19:48 +0000
commitdf4b52670da644e7bd952242b6d1e8f6fcd0c5b2 (patch)
tree362f2780fa4da1e285ed537b8a08e2eccf119a0b /lib/libpthread/uthread/pthread_private.h
parentd9bad47758857d3344bedc12dff936f73958442f (diff)
More sync with freebsd code; join related code this time.
Diffstat (limited to 'lib/libpthread/uthread/pthread_private.h')
-rw-r--r--lib/libpthread/uthread/pthread_private.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h
index a07ebaf431d..b5556c44ffe 100644
--- a/lib/libpthread/uthread/pthread_private.h
+++ b/lib/libpthread/uthread/pthread_private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread_private.h,v 1.30 2001/12/08 14:51:36 fgsch Exp $ */
+/* $OpenBSD: pthread_private.h,v 1.31 2001/12/11 00:19:47 fgsch Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -538,6 +538,12 @@ typedef void (*thread_continuation_t) (void *);
typedef V_TAILQ_ENTRY(pthread) pthread_entry_t;
+struct join_status {
+ struct pthread *thread;
+ void *ret;
+ int error;
+};
+
/*
* Thread structure.
*/
@@ -638,8 +644,12 @@ struct pthread {
*/
int error;
- /* Join queue head and link for waiting threads: */
- V_TAILQ_HEAD(join_head, pthread) join_queue;
+ /*
+ * The joiner is the thread that is joining this thraed. The
+ * join status keeps track of a join operation to another thread.
+ */
+ struct pthread *joiner;
+ struct join_status join_status;
/*
* The current thread can belong to only one scheduling queue at
@@ -648,8 +658,6 @@ struct pthread {
*
* o A queue of threads waiting for a mutex
* o A queue of threads waiting for a condition variable
- * o A queue of threads waiting for another thread to terminate
- * (the join queue above)
* o A queue of threads waiting for a file descriptor lock
* o A queue of threads needing work done by the kernel thread
* (waiting for a spinlock or file I/O)
@@ -661,6 +669,9 @@ struct pthread {
/* Priority queue entry for this thread: */
pthread_entry_t pqe;
+ /* Priority queue entry for this thread: */
+ pthread_entry_t sqe;
+
/* Queue entry for this thread: */
pthread_entry_t qe;
@@ -1018,7 +1029,6 @@ SCLASS int _thread_kern_new_state
* Function prototype definitions.
*/
__BEGIN_DECLS
-int _find_dead_thread(pthread_t);
int _find_thread(pthread_t);
struct pthread *_get_curthread(void);
void _set_curthread(struct pthread *);