From 418a2eeae8912d14e32b0119232b897e78221037 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Sun, 10 May 2009 22:27:54 -0400 Subject: Don't require external use of internal enum smb_thread_lock_type - Internally, when locking or unlocking a mutex, we'll pass one of the values of enum smb_thread_lock_type. That enum is not available to users providing a thread implementation. Externally, we'll document the integer values which will be passed to their lock_mutex function, but not require them to access our internal header file. Derrell --- lib/util/smb_threads.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/util/smb_threads.h') diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h index f1a39a6e28..012b61c1ed 100644 --- a/lib/util/smb_threads.h +++ b/lib/util/smb_threads.h @@ -37,8 +37,9 @@ struct smb_thread_functions { const char *location); void (*destroy_mutex)(void *plock, const char *location); - int (*lock_mutex)(void *plock, enum smb_thread_lock_type lock_type, - const char *location); + int (*lock_mutex)(void *plock, + int lock_type, + const char *location); /* Thread local storage. */ int (*create_tls)(const char *keyname, @@ -76,7 +77,7 @@ static void smb_destroy_mutex_pthread(void *plock, const char *location) \ free(plock); \ } \ \ -static int smb_lock_pthread(void *plock, enum smb_thread_lock_type lock_type, const char *location) \ +static int smb_lock_pthread(void *plock, int lock_type, const char *location) \ { \ if (lock_type == SMB_THREAD_UNLOCK) { \ return pthread_mutex_unlock((pthread_mutex_t *)plock); \ -- cgit