diff options
| author | Ezra Peisach <epeisach@mit.edu> | 2005-01-22 01:28:14 +0000 |
|---|---|---|
| committer | Ezra Peisach <epeisach@mit.edu> | 2005-01-22 01:28:14 +0000 |
| commit | d9b1e22b1ab80cec6fdb857e04daf272c622b985 (patch) | |
| tree | b80054f291c0e0edd63f0ad3086656712427ca60 /src/include | |
| parent | 87f5cb6e233c4d16dc4eed9b9a070088daf02c09 (diff) | |
| download | krb5-d9b1e22b1ab80cec6fdb857e04daf272c622b985.tar.gz krb5-d9b1e22b1ab80cec6fdb857e04daf272c622b985.tar.xz krb5-d9b1e22b1ab80cec6fdb857e04daf272c622b985.zip | |
Irix k5_os_mutex_lock calls k5_pthread_mutex_lock w/ wrong arg
* 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 used, provide
correct prototype. Add missing close paren.
Test programs show that under irix, the mutex locking/unlocking code was
working - even with the wrong memory use... I do not understand why.
ticket: new
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17062 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ChangeLog | 8 | ||||
| -rw-r--r-- | src/include/k5-thread.h | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 6227a7e924..8c85be46dc 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -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 diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index 606030749f..2caf8ecc9e 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -339,7 +339,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 @@ -501,7 +501,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 @@ -585,7 +585,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(), \ |
