21 #ifndef OPAL_MUTEX_WINDOWS_H
22 #define OPAL_MUTEX_WINDOWS_H 1
34 #include "opal_config.h"
46 const char *m_lock_file;
56 return (0 == InterlockedExchange(&m->m_lock, 1) ? 1 : 0);
62 while (InterlockedExchange(&m->m_lock, 1)) {
63 while (m->m_lock == 1) {
72 InterlockedExchange(&m->m_lock, 0);
static void opal_mutex_lock(opal_mutex_t *mutex)
Acquire a mutex.
static int opal_mutex_atomic_trylock(opal_mutex_t *mutex)
Try to acquire a mutex using atomic operations.
static void opal_mutex_atomic_unlock(opal_mutex_t *mutex)
Release a mutex using atomic operations.
Definition: mutex_unix.h:53
static int opal_mutex_trylock(opal_mutex_t *mutex)
Try to acquire a mutex.
static void opal_mutex_unlock(opal_mutex_t *mutex)
Release a mutex.
Base object.
Definition: opal_object.h:182
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
static void opal_mutex_atomic_lock(opal_mutex_t *mutex)
Acquire a mutex using atomic operations.
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236