summaryrefslogtreecommitdiff
path: root/lib/util/smb_threads.h
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@dworkin.(none)>2009-05-10 22:27:54 -0400
committerDerrell Lipman <derrell@dworkin.(none)>2009-05-10 22:45:12 -0400
commit418a2eeae8912d14e32b0119232b897e78221037 (patch)
treedd30e682b41876ccc26e0ce0ae93a8cc467fe0c9 /lib/util/smb_threads.h
parentd3434477e6d42432a0acf426fcfbe39eb11b1fd0 (diff)
downloadsamba-418a2eeae8912d14e32b0119232b897e78221037.tar.gz
samba-418a2eeae8912d14e32b0119232b897e78221037.tar.bz2
samba-418a2eeae8912d14e32b0119232b897e78221037.zip
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
Diffstat (limited to 'lib/util/smb_threads.h')
-rw-r--r--lib/util/smb_threads.h7
1 files changed, 4 insertions, 3 deletions
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); \