From f49269698da5588b1fa5c6cf9fc550094d20e174 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 13 Sep 1995 19:50:07 +0000 Subject: (CONDITION_INITIALIZER): Provide initial zero for IMPLICATIONS member. (condition_init): Bother initializing NAME and IMPLICATIONS members. --- libthreads/cthreads.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'libthreads') 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 : "?") -- cgit v1.2.3