aboutsummaryrefslogtreecommitdiffstats
path: root/erts/include/internal/ethr_mutex.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-21 09:14:34 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:16:08 +0100
commitad9d36c55fb6c77ce0a6163e009313deaa2d2bb0 (patch)
treedbfcb0002339ae2ab1e99e8a9f9b94f0bde7ccdb /erts/include/internal/ethr_mutex.h
parent6d010bd4ea3a5bb182cab4aff4436eb4f058c301 (diff)
downloadotp-ad9d36c55fb6c77ce0a6163e009313deaa2d2bb0.tar.gz
otp-ad9d36c55fb6c77ce0a6163e009313deaa2d2bb0.tar.bz2
otp-ad9d36c55fb6c77ce0a6163e009313deaa2d2bb0.zip
ose: Cleanup of mutex selection defines
Diffstat (limited to 'erts/include/internal/ethr_mutex.h')
-rw-r--r--erts/include/internal/ethr_mutex.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/erts/include/internal/ethr_mutex.h b/erts/include/internal/ethr_mutex.h
index 9511add075..ee861065c5 100644
--- a/erts/include/internal/ethr_mutex.h
+++ b/erts/include/internal/ethr_mutex.h
@@ -97,15 +97,12 @@ void LeaveCriticalSection(CRITICAL_SECTION *);
#if 0
# define ETHR_MTX_Q_LOCK_SPINLOCK__
# define ETHR_MTX_QLOCK_TYPE__ ethr_spinlock_t
-#elif defined(ETHR_PTHREADS)
+#elif defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)
# define ETHR_MTX_Q_LOCK_PTHREAD_MUTEX__
# define ETHR_MTX_QLOCK_TYPE__ pthread_mutex_t
#elif defined(ETHR_WIN32_THREADS)
# define ETHR_MTX_Q_LOCK_CRITICAL_SECTION__
# define ETHR_MTX_QLOCK_TYPE__ CRITICAL_SECTION
-#elif defined(ETHR_OSE_THREADS)
-# define ETHR_MTX_Q_LOCK_PTHREAD_MUTEX__
-# define ETHR_MTX_QLOCK_TYPE__ pthread_mutex_t
#else
# error Need a qlock implementation
#endif
@@ -213,7 +210,7 @@ struct ethr_cond_ {
#endif
};
-#elif defined(ETHR_PTHREADS) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
+#elif (defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
typedef struct ethr_mutex_ ethr_mutex;
struct ethr_mutex_ {
@@ -258,25 +255,6 @@ struct ethr_cond_ {
#endif
};
-#elif defined(ETHR_OSE_THREADS)
-
-typedef struct ethr_mutex_ ethr_mutex;
-struct ethr_mutex_ {
- pthread_mutex_t pt_mtx;
-#if ETHR_XCHK
- int initialized;
-#endif
-};
-
-typedef struct ethr_cond_ ethr_cond;
-struct ethr_cond_ {
- pthread_cond_t pt_cnd;
-#if ETHR_XCHK
- int initialized;
-#endif
-};
-
-
#else
# error "no mutex implementation"
#endif
@@ -655,7 +633,7 @@ ETHR_INLINE_MTX_FUNC_NAME_(ethr_mutex_unlock)(ethr_mutex *mtx)
#endif /* ETHR_TRY_INLINE_FUNCS */
-#elif defined(ETHR_PTHREADS) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
+#elif (defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
#if defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_MUTEX_IMPL__)