Branch: Tag:

2000-04-18

2000-04-18 06:54:13 by 0

Always initialize mutex and condition variables before use.

Rev: src/modules/Gdbm/gdbmmod.c:1.9
Rev: src/modules/HTTPLoop/accept_and_parse.c:1.11
Rev: src/modules/HTTPLoop/cache.c:1.8
Rev: src/modules/Msql/msqlmod.c:1.12
Rev: src/modules/Postgres/pgresult.c:1.12
Rev: src/modules/Postgres/postgres.c:1.17
Rev: src/modules/spider/spider.c:1.90
Rev: src/threads.c:1.120
Rev: src/threads.h:1.84

1:   /* -  * $Id: threads.h,v 1.83 2000/04/17 18:47:44 mast Exp $ +  * $Id: threads.h,v 1.84 2000/04/18 06:53:48 jonasw Exp $    */   #ifndef THREADS_H   #define THREADS_H
656:   #define MUTEX_T PIKE_MUTEX_T   #endif    +  + /* Initializer macros for static mutex and condition variables */ + #ifdef PTHREAD_MUTEX_INITIALIZER + #define STATIC_MUTEX_INIT = PTHREAD_MUTEX_INITIALIZER + #else + #define STATIC_MUTEX_INIT + #endif + #ifdef PTHREAD_COND_INITIALIZER + #define STATIC_COND_INIT = PTHREAD_COND_INITIALIZER + #else + #define STATIC_COND_INIT + #endif +  +  +    #endif /* THREADS_H */