summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-07-14 00:15:23 +0000
committerKen Raeburn <raeburn@mit.edu>2004-07-14 00:15:23 +0000
commitae9cae48c8d550f39039b874da786978f5bee282 (patch)
treef91a9f413ba7f1d35c2115c1f6c0422b8cd7ac3c /src/include
parent507a247d23f5e9fdbc727df1139dcf3be406e5f1 (diff)
downloadkrb5-ae9cae48c8d550f39039b874da786978f5bee282.tar.gz
krb5-ae9cae48c8d550f39039b874da786978f5bee282.tar.xz
krb5-ae9cae48c8d550f39039b874da786978f5bee282.zip
* 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16587 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ChangeLog6
-rw-r--r--src/include/k5-thread.h8
2 files changed, 12 insertions, 2 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index 1974686961..9110348df7 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,3 +1,9 @@
+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,
diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h
index 4d1a6fca58..7256a3c776 100644
--- a/src/include/k5-thread.h
+++ b/src/include/k5-thread.h
@@ -418,10 +418,14 @@ typedef struct {
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 \