2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mono / io-layer / mono-mutex.h
index 3c4ba577fff5c2255c574820fe09d81349a975dc..36c37de10b4523c79a2be827c7c31b0ee57f8bbc 100644 (file)
@@ -33,6 +33,8 @@ extern "C" {
 #include <pthread.h>
 #include <time.h>
 
+G_BEGIN_DECLS
+
 typedef struct {
        pthread_mutex_t mutex;
        gboolean complete;
@@ -88,7 +90,6 @@ typedef struct _mono_mutex_t {
 #define MONO_MUTEX_INITIALIZER { 0, MONO_THREAD_NONE, 0, 0, PTHREAD_MUTEX_INITIALIZER, 0 }
 #define MONO_RECURSIVE_MUTEX_INITIALIZER { 0, MONO_THREAD_NONE, 0, 0, PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER }
 
-
 int mono_mutexattr_init (mono_mutexattr_t *attr);
 int mono_mutexattr_settype (mono_mutexattr_t *attr, int type);
 int mono_mutexattr_gettype (mono_mutexattr_t *attr, int *type);
@@ -162,6 +163,7 @@ typedef pthread_mutexattr_t mono_mutexattr_t;
 /* This is a function so it can be passed to pthread_cleanup_push -
  * that is a macro and giving it a macro as a parameter breaks.
  */
+G_GNUC_UNUSED
 static inline int mono_mutex_unlock_in_cleanup (mono_mutex_t *mutex)
 {
        return(mono_mutex_unlock (mutex));