summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/mutex.h12
-rw-r--r--source4/lib/mutex.c16
-rw-r--r--source4/script/mkproto.pl4
3 files changed, 17 insertions, 15 deletions
diff --git a/source4/include/mutex.h b/source4/include/mutex.h
index 20caaf5aa2..ec1a7d285c 100644
--- a/source4/include/mutex.h
+++ b/source4/include/mutex.h
@@ -38,12 +38,12 @@ enum rwlock_id { RWLOCK_SMBD, /* global smbd lock */
RWLOCK_MAX /* this MUST be kept last */
};
-#define MUTEX_LOCK_BY_ID(mutex_index) mutex_lock_by_id(mutex_index, #mutex_index)
-#define MUTEX_UNLOCK_BY_ID(mutex_index) mutex_unlock_by_id(mutex_index, #mutex_index)
-#define MUTEX_INIT(mutex, name) mutex_init(mutex, #name)
-#define MUTEX_DESTROY(mutex, name) mutex_destroy(mutex, #name)
-#define MUTEX_LOCK(mutex, name) mutex_lock(mutex, #name)
-#define MUTEX_UNLOCK(mutex, name) mutex_unlock(mutex, #name)
+#define MUTEX_LOCK_BY_ID(mutex_index) smb_mutex_lock_by_id(mutex_index, #mutex_index)
+#define MUTEX_UNLOCK_BY_ID(mutex_index) smb_mutex_unlock_by_id(mutex_index, #mutex_index)
+#define MUTEX_INIT(mutex, name) smb_mutex_init(mutex, #name)
+#define MUTEX_DESTROY(mutex, name) smb_mutex_destroy(mutex, #name)
+#define MUTEX_LOCK(mutex, name) smb_mutex_lock(mutex, #name)
+#define MUTEX_UNLOCK(mutex, name) smb_mutex_unlock(mutex, #name)
#define RWLOCK_INIT(rwlock, name) rwlock_init(rwlock, #name)
#define RWLOCK_DESTROY(rwlock, name) rwlock_destroy(rwlock, #name)
diff --git a/source4/lib/mutex.c b/source4/lib/mutex.c
index c1a0986040..8d1eee7828 100644
--- a/source4/lib/mutex.c
+++ b/source4/lib/mutex.c
@@ -28,17 +28,17 @@ static struct {
struct mutex_ops ops;
} mutex_handlers;
-int mutex_lock_by_id(enum mutex_id id, const char *name)
+int smb_mutex_lock_by_id(enum mutex_id id, const char *name)
{
- return mutex_lock(&mutex_list[id], name);
+ return smb_mutex_lock(&mutex_list[id], name);
}
-int mutex_unlock_by_id(enum mutex_id id, const char *name)
+int smb_mutex_unlock_by_id(enum mutex_id id, const char *name)
{
- return mutex_unlock(&mutex_list[id], name);
+ return smb_mutex_unlock(&mutex_list[id], name);
}
-int mutex_init(smb_mutex_t *mutex, const char *name)
+int smb_mutex_init(smb_mutex_t *mutex, const char *name)
{
if (mutex_handlers.ops.mutex_init) {
return mutex_handlers.ops.mutex_init(mutex, name);
@@ -46,7 +46,7 @@ int mutex_init(smb_mutex_t *mutex, const char *name)
return 0;
}
-int mutex_destroy(smb_mutex_t *mutex, const char *name)
+int smb_mutex_destroy(smb_mutex_t *mutex, const char *name)
{
if (mutex_handlers.ops.mutex_destroy) {
return mutex_handlers.ops.mutex_destroy(mutex, name);
@@ -54,7 +54,7 @@ int mutex_destroy(smb_mutex_t *mutex, const char *name)
return 0;
}
-int mutex_lock(smb_mutex_t *mutex, const char *name)
+int smb_mutex_lock(smb_mutex_t *mutex, const char *name)
{
if (mutex_handlers.ops.mutex_lock) {
return mutex_handlers.ops.mutex_lock(mutex, name);
@@ -62,7 +62,7 @@ int mutex_lock(smb_mutex_t *mutex, const char *name)
return 0;
}
-int mutex_unlock(smb_mutex_t *mutex, const char *name)
+int smb_mutex_unlock(smb_mutex_t *mutex, const char *name)
{
if (mutex_handlers.ops.mutex_unlock) {
return mutex_handlers.ops.mutex_unlock(mutex, name);
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index 66f2799147..dac64045ce 100644
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -1,7 +1,9 @@
#!/usr/bin/perl
use strict;
-use warnings;
+
+# don't use warnings module as it is not portable enough
+# use warnings;
my $header_name = '_PROTO_H_';