diff options
Diffstat (limited to 'mono/io-layer/mono-mutex.h')
-rw-r--r-- | mono/io-layer/mono-mutex.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mono/io-layer/mono-mutex.h b/mono/io-layer/mono-mutex.h index 8e233167629..8f4f3f2c947 100644 --- a/mono/io-layer/mono-mutex.h +++ b/mono/io-layer/mono-mutex.h @@ -33,12 +33,6 @@ extern "C" { #include <pthread.h> #include <time.h> -#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK -extern int pthread_mutex_timedlock (pthread_mutex_t *mutex, - const struct timespec *timeout); -#endif /* HAVE_PTHREAD_MUTEX_TIMEDLOCK */ - - typedef struct { pthread_mutex_t mutex; gboolean complete; @@ -165,6 +159,15 @@ typedef pthread_mutexattr_t mono_mutexattr_t; #endif /* USE_MONO_MUTEX */ +/* 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)); +} + #ifdef __cplusplus } #endif /* __cplusplus */ |