#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;
#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.
+ */
+static inline int mono_mutex_unlock_in_cleanup (mono_mutex_t *mutex)
+{
+ return(mono_mutex_unlock (mutex));
+}
+
#ifdef __cplusplus
}
#endif /* __cplusplus */