summaryrefslogtreecommitdiff
path: root/libthreads
diff options
context:
space:
mode:
Diffstat (limited to 'libthreads')
-rw-r--r--libthreads/cthreads.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/libthreads/cthreads.h b/libthreads/cthreads.h
index 08394ae5..38d88545 100644
--- a/libthreads/cthreads.h
+++ b/libthreads/cthreads.h
@@ -26,6 +26,9 @@
/*
* HISTORY
* $Log: cthreads.h,v $
+ * Revision 1.8 1995/08/30 15:10:23 mib
+ * (hurd_condition_wait): Provide declaration.
+ *
* Revision 1.7 1995/07/18 17:15:51 mib
* Reverse previous change.
*
@@ -374,8 +377,15 @@ typedef struct condition {
spin_lock_t lock;
struct cthread_queue queue;
char *name;
+ struct cond_imp *implications;
} *condition_t;
+struct cond_imp
+{
+ struct condition *implicatand;
+ struct cond_imp *next;
+};
+
#define CONDITION_INITIALIZER { SPIN_LOCK_INITIALIZER, QUEUE_INITIALIZER, 0 }
#define condition_alloc() ((condition_t) calloc(1, sizeof(struct condition)))
@@ -399,19 +409,19 @@ typedef struct condition {
#define condition_signal(c) \
MACRO_BEGIN \
- if ((c)->queue.head) { \
+ if ((c)->queue.head || (c)->implications) { \
cond_signal(c); \
} \
MACRO_END
#define condition_broadcast(c) \
MACRO_BEGIN \
- if ((c)->queue.head) { \
+ if ((c)->queue.head || (c)->implications) { \
cond_broadcast(c); \
} \
MACRO_END
-extern void
+extern int
cond_signal C_ARG_DECLS((condition_t c));
extern void
@@ -423,6 +433,12 @@ condition_wait C_ARG_DECLS((condition_t c, mutex_t m));
extern int
hurd_condition_wait C_ARG_DECLS((condition_t c, mutex_t m));
+extern void
+condition_implies C_ARG_DECLS((condition_t implicator, condition_t implicatand));
+
+extern void
+condition_unimplies C_ARG_DECLS((condition_t implicator, condition_t implicatand));
+
/*
* Threads.
*/