A working version of the mutex_trylock for Windows.
This commit was SVN r15084.
Этот коммит содержится в:
родитель
a09aebc30b
Коммит
8c5b63768c
@ -52,7 +52,7 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_mutex_t);
|
||||
|
||||
static inline int opal_mutex_trylock(opal_mutex_t *m)
|
||||
{
|
||||
return (int) InterlockedExchange(&m->m_lock, 1);
|
||||
return (0 == InterlockedExchange(&m->m_lock, 1) ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user