summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-09-13 19:50:07 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-09-13 19:50:07 +0000
commitf49269698da5588b1fa5c6cf9fc550094d20e174 (patch)
tree3812cca63007b42214065d88e21e0b8a5df076e2
parent7bbb05f049cac03303a64cc4f986d22d02b56321 (diff)
(CONDITION_INITIALIZER): Provide initial zero for IMPLICATIONS member.
(condition_init): Bother initializing NAME and IMPLICATIONS members.
-rw-r--r--libthreads/cthreads.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/libthreads/cthreads.h b/libthreads/cthreads.h
index 38d88545..062530e4 100644
--- a/libthreads/cthreads.h
+++ b/libthreads/cthreads.h
@@ -26,6 +26,16 @@
/*
* HISTORY
* $Log: cthreads.h,v $
+ * Revision 1.9 1995/08/30 15:51:41 mib
+ * (condition_implies, condition_unimplies): New functions.
+ * (struct condition): New member `implications'.
+ * (cond_imp): New structure.
+ * (cond_signal): Return int now.
+ * (condition_broadcast): Always call cond_broadcast if this condition
+ * has implications.
+ * (condition_signal): Always call cond_signal if this condition has
+ * implications.
+ *
* Revision 1.8 1995/08/30 15:10:23 mib
* (hurd_condition_wait): Provide declaration.
*
@@ -386,13 +396,15 @@ struct cond_imp
struct cond_imp *next;
};
-#define CONDITION_INITIALIZER { SPIN_LOCK_INITIALIZER, QUEUE_INITIALIZER, 0 }
+#define CONDITION_INITIALIZER { SPIN_LOCK_INITIALIZER, QUEUE_INITIALIZER, 0, 0 }
#define condition_alloc() ((condition_t) calloc(1, sizeof(struct condition)))
#define condition_init(c) \
MACRO_BEGIN \
spin_lock_init(&(c)->lock); \
cthread_queue_init(&(c)->queue); \
+ (c)->name = 0; \
+ (c)->implications = 0; \
MACRO_END
#define condition_set_name(c, x) ((c)->name = (x))
#define condition_name(c) ((c)->name != 0 ? (c)->name : "?")