- 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
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,
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); \