+2004-07-13 Ken Raeburn <raeburn@mit.edu>
+
+ * k5-thread.h (k5_os_mutex_init, k5_os_mutex_destroy): If
+ USE_PTHREAD_LOCK_ONLY_IF_LOADED is defined, use pthread_mutex_init
+ and _destroy only if pthread support is loaded.
+
2004-07-11 Ken Raeburn <raeburn@mit.edu>
* k5-thread.h (k5_os_mutex_lock, k5_os_mutex_unlock,
k5_os_nothread_mutex_finish_init(&(M)->n)
# define k5_os_mutex_init(M) \
(k5_os_nothread_mutex_init(&(M)->n), \
- pthread_mutex_init(&(M)->p, 0))
+ (K5_PTHREADS_LOADED \
+ ? pthread_mutex_init(&(M)->p, 0) \
+ : 0))
# define k5_os_mutex_destroy(M) \
(k5_os_nothread_mutex_destroy(&(M)->n), \
- pthread_mutex_destroy(&(M)->p))
+ (K5_PTHREADS_LOADED \
+ ? pthread_mutex_destroy(&(M)->p) \
+ : 0))
# define k5_os_mutex_lock(M) \
(K5_PTHREADS_LOADED \