mutex_trylock returns 0 (success) if locked and non-zero (error) if not
locked. Make the non-threaded case always return "locked", similar to the non-threaded case for mutex_lock. This commit was SVN r9956.
Этот коммит содержится в:
родитель
15758d5f29
Коммит
e76c0ceadb
@ -187,9 +187,9 @@ static inline bool opal_set_using_threads(bool have)
|
||||
#endif
|
||||
|
||||
#if OMPI_HAVE_THREAD_SUPPORT
|
||||
#define OPAL_THREAD_TRYLOCK(mutex) (opal_using_threads() ? opal_mutex_trylock(mutex) : 1)
|
||||
#define OPAL_THREAD_TRYLOCK(mutex) (opal_using_threads() ? opal_mutex_trylock(mutex) : 0)
|
||||
#else
|
||||
#define OPAL_THREAD_TRYLOCK(mutex) 1
|
||||
#define OPAL_THREAD_TRYLOCK(mutex) 0
|
||||
#endif
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user