From ec7b2ecc107401c0fe24fb738be0e6d031f0f622 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 May 1994 10:52:06 +0000 Subject: entered into RCS --- libthreads/cthreads.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libthreads/cthreads.h b/libthreads/cthreads.h index d642ae9b..a7b09a1b 100644 --- a/libthreads/cthreads.h +++ b/libthreads/cthreads.h @@ -220,7 +220,12 @@ int NEVER; */ extern int cthread_init(); +#if 0 +/* This prototype is broken for GNU. */ extern any_t calloc C_ARG_DECLS((unsigned n, unsigned size)); +#else +#include +#endif /* * Queues. @@ -320,7 +325,8 @@ typedef struct mutex { struct cthread_queue queue; } *mutex_t; -#define MUTEX_INITIALIZER { SPIN_LOCK_INITIALIZER, 0, QUEUE_INITIALIZER, SPIN_LOCK_INITIALIZER} +/* Rearranged accordingly for GNU: */ +#define MUTEX_INITIALIZER { SPIN_LOCK_INITIALIZER, SPIN_LOCK_INITIALIZER, 0, QUEUE_INITIALIZER } #define mutex_alloc() ((mutex_t) calloc(1, sizeof(struct mutex))) #define mutex_init(m) \ -- cgit v1.2.3