patch-rocs_impl_unx_umutex_c 551 B

123456789101112131415
  1. $OpenBSD: patch-rocs_impl_unx_umutex_c,v 1.1 2017/05/07 23:57:16 espie Exp $
  2. Index: rocs/impl/unx/umutex.c
  3. --- rocs/impl/unx/umutex.c.orig
  4. +++ rocs/impl/unx/umutex.c
  5. @@ -94,7 +94,7 @@ Boolean rocs_mutex_wait( iOMutexData o, int t ) {
  6. if( t == -1 ) {
  7. rc = pthread_mutex_lock( (pthread_mutex_t*)data->mh );
  8. }
  9. - else if( rc = pthread_mutex_trylock( (pthread_mutex_t*)data->mh ) == EBUSY ) {
  10. + else if( (rc = pthread_mutex_trylock( (pthread_mutex_t*)data->mh )) == EBUSY ) {
  11. int try = t / 10 + 1;
  12. do {
  13. ThreadOp.sleep( 10 );