summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/mutex.h12
-rw-r--r--source4/lib/mutex.c10
-rw-r--r--source4/smbd/process_thread.c10
3 files changed, 16 insertions, 16 deletions
diff --git a/source4/include/mutex.h b/source4/include/mutex.h
index c7c58b36a0..20caaf5aa2 100644
--- a/source4/include/mutex.h
+++ b/source4/include/mutex.h
@@ -60,7 +60,7 @@ typedef struct {
} smb_mutex_t;
typedef struct {
void *rwlock;
-} rwlock_t;
+} smb_rwlock_t;
/* the mutex model operations structure - contains function pointers to
the model-specific implementations of each operation */
@@ -69,11 +69,11 @@ struct mutex_ops {
int (*mutex_lock)(smb_mutex_t *mutex, const char *name);
int (*mutex_unlock)(smb_mutex_t *mutex, const char *name);
int (*mutex_destroy)(smb_mutex_t *mutex, const char *name);
- int (*rwlock_init)(rwlock_t *rwlock, const char *name);
- int (*rwlock_lock_write)(rwlock_t *rwlock, const char *name);
- int (*rwlock_lock_read)(rwlock_t *rwlock, const char *name);
- int (*rwlock_unlock)(rwlock_t *rwlock, const char *name);
- int (*rwlock_destroy)(rwlock_t *rwlock, const char *name);
+ int (*rwlock_init)(smb_rwlock_t *rwlock, const char *name);
+ int (*rwlock_lock_write)(smb_rwlock_t *rwlock, const char *name);
+ int (*rwlock_lock_read)(smb_rwlock_t *rwlock, const char *name);
+ int (*rwlock_unlock)(smb_rwlock_t *rwlock, const char *name);
+ int (*rwlock_destroy)(smb_rwlock_t *rwlock, const char *name);
};
#endif /* ndef _MUTEX_H_ */
diff --git a/source4/lib/mutex.c b/source4/lib/mutex.c
index 18b7e08b5a..c1a0986040 100644
--- a/source4/lib/mutex.c
+++ b/source4/lib/mutex.c
@@ -72,7 +72,7 @@ int mutex_unlock(smb_mutex_t *mutex, const char *name)
/* read/write lock routines */
-int rwlock_init(rwlock_t *rwlock, const char *name)
+int rwlock_init(smb_rwlock_t *rwlock, const char *name)
{
if (mutex_handlers.ops.rwlock_init) {
return mutex_handlers.ops.rwlock_init(rwlock, name);
@@ -80,7 +80,7 @@ int rwlock_init(rwlock_t *rwlock, const char *name)
return 0;
}
-int rwlock_destroy(rwlock_t *rwlock, const char *name)
+int rwlock_destroy(smb_rwlock_t *rwlock, const char *name)
{
if (mutex_handlers.ops.rwlock_destroy) {
return mutex_handlers.ops.rwlock_destroy(rwlock, name);
@@ -88,7 +88,7 @@ int rwlock_destroy(rwlock_t *rwlock, const char *name)
return 0;
}
-int rwlock_lock_write(rwlock_t *rwlock, const char *name)
+int rwlock_lock_write(smb_rwlock_t *rwlock, const char *name)
{
if (mutex_handlers.ops.rwlock_lock_write) {
return mutex_handlers.ops.rwlock_lock_write(rwlock, name);
@@ -96,7 +96,7 @@ int rwlock_lock_write(rwlock_t *rwlock, const char *name)
return 0;
}
-int rwlock_lock_read(rwlock_t *rwlock, const char *name)
+int rwlock_lock_read(smb_rwlock_t *rwlock, const char *name)
{
if (mutex_handlers.ops.rwlock_lock_read) {
return mutex_handlers.ops.rwlock_lock_read(rwlock, name);
@@ -104,7 +104,7 @@ int rwlock_lock_read(rwlock_t *rwlock, const char *name)
return 0;
}
-int rwlock_unlock(rwlock_t *rwlock, const char *name)
+int rwlock_unlock(smb_rwlock_t *rwlock, const char *name)
{
if (mutex_handlers.ops.rwlock_unlock) {
return mutex_handlers.ops.rwlock_unlock(rwlock, name);
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index d02238c840..523c38f521 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -221,7 +221,7 @@ static int thread_mutex_unlock(smb_mutex_t *mutex, const char *name)
/*
rwlock init function for thread model
*/
-static int thread_rwlock_init(rwlock_t *rwlock, const char *name)
+static int thread_rwlock_init(smb_rwlock_t *rwlock, const char *name)
{
pthread_rwlock_t m = PTHREAD_RWLOCK_INITIALIZER;
rwlock->rwlock = memdup(&m, sizeof(m));
@@ -235,7 +235,7 @@ static int thread_rwlock_init(rwlock_t *rwlock, const char *name)
/*
rwlock destroy function for thread model
*/
-static int thread_rwlock_destroy(rwlock_t *rwlock, const char *name)
+static int thread_rwlock_destroy(smb_rwlock_t *rwlock, const char *name)
{
return pthread_rwlock_destroy((pthread_rwlock_t *)rwlock->rwlock);
}
@@ -243,7 +243,7 @@ static int thread_rwlock_destroy(rwlock_t *rwlock, const char *name)
/*
rwlock lock for read function for thread model
*/
-static int thread_rwlock_lock_read(rwlock_t *rwlockP, const char *name)
+static int thread_rwlock_lock_read(smb_rwlock_t *rwlockP, const char *name)
{
pthread_rwlock_t *rwlock = (pthread_rwlock_t *)rwlockP->rwlock;
int rc;
@@ -272,7 +272,7 @@ static int thread_rwlock_lock_read(rwlock_t *rwlockP, const char *name)
/*
rwlock lock for write function for thread model
*/
-static int thread_rwlock_lock_write(rwlock_t *rwlockP, const char *name)
+static int thread_rwlock_lock_write(smb_rwlock_t *rwlockP, const char *name)
{
pthread_rwlock_t *rwlock = (pthread_rwlock_t *)rwlockP->rwlock;
int rc;
@@ -302,7 +302,7 @@ static int thread_rwlock_lock_write(rwlock_t *rwlockP, const char *name)
/*
rwlock unlock for thread model
*/
-static int thread_rwlock_unlock(rwlock_t *rwlock, const char *name)
+static int thread_rwlock_unlock(smb_rwlock_t *rwlock, const char *name)
{
return pthread_rwlock_unlock((pthread_rwlock_t *)rwlock->rwlock);
}