1
1

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.
Этот коммит содержится в:
Brian Barrett 2006-05-17 15:50:21 +00:00
родитель 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