pullup from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 24 Jan 2005 20:46:41 +0000 (20:46 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 24 Jan 2005 20:46:41 +0000 (20:46 +0000)
ticket: 2893
version_fixed: 1.4
target_version: 1.4
component: krb5-libs

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17064 dc483132-0cff-0310-8789-dd5450dbe970

src/include/ChangeLog
src/include/k5-thread.h

index b159b282f62d41053936425862a2f5e1ff53a0d1..a52995d3190eaa9d974c487eda0d6db51e7a974c 100644 (file)
@@ -1,3 +1,11 @@
+2005-01-21  Ezra Peisach  <epeisach@mit.edu>
+
+       * k5-thread.h (k5_os_mutex_lock): Under Irix, invoke
+       k5_pthread_mutex_lock() with the k5_os_mutex, not the
+       pthread_mutex_t.
+       (k5_pthread_assert_locked,unlocked): If DEBUG_THREADS not use, provide
+       correct prototype. Add missing close paren.
+
 2005-01-14  Ken Raeburn  <raeburn@mit.edu>
 
        * k5-thread.h [HAVE_PTHREAD && HAVE_PRAGMA_WEAK_REF]: Mark
index 210562458e2e9e038d1f38911a67796eb024d0fa..9ac5219f4181f16e047a34a2f9c69135c1692246 100644 (file)
@@ -301,7 +301,7 @@ static inline int k5_os_nothread_mutex_unlock(k5_os_nothread_mutex *m) {
     return 0;
 }
 # define k5_os_nothread_mutex_assert_locked(M)         ((void)0)
-# define k5_os_nothread_mutex_assert_unlocked(M)       ((void(0)
+# define k5_os_nothread_mutex_assert_unlocked(M)       ((void)0)
 
 #endif
 
@@ -463,7 +463,7 @@ k5_pthread_mutex_lock(k5_os_mutex *m)
         pthread_mutex_unlock(&(M)->p))
 #else
 # define k5_pthread_mutex_lock(M) pthread_mutex_lock(&(M)->p)
-static inline void k5_pthread_assert_locked(pthread_mutex_t *m) { }
+static inline void k5_pthread_assert_locked(k5_os_mutex *m) { }
 # define k5_pthread_mutex_unlock(M) pthread_mutex_unlock(&(M)->p)
 #endif
 
@@ -547,7 +547,7 @@ static inline int return_after_yield(int r)
 
 # define k5_os_mutex_lock(M)                                           \
        return_after_yield(K5_PTHREADS_LOADED                           \
-                          ? k5_pthread_mutex_lock(&(M)->p)             \
+                          ? k5_pthread_mutex_lock(M)                   \
                           : k5_os_nothread_mutex_lock(&(M)->n))
 # define k5_os_mutex_unlock(M)                         \
        (MAYBE_SCHED_YIELD(),                           \