Explorar o código

- omp_nest_lock_test should return the nesting level instead of boolean state

Olivier Aumage %!s(int64=11) %!d(string=hai) anos
pai
achega
311ab2ce01
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/util/openmp_runtime_support.c

+ 2 - 2
src/util/openmp_runtime_support.c

@@ -2157,14 +2157,14 @@ static int _starpu_omp_nest_lock_test(void **_internal)
 		_nest_lock->state = 1;
 		_nest_lock->owner_task = task;
 		_nest_lock->nesting = 1;
-		ret = 1;
+		ret = _nest_lock->nesting;
 	}
 	else if (_nest_lock->owner_task == task)
 	{
 		STARPU_ASSERT(_nest_lock->state == 1);
 		STARPU_ASSERT(_nest_lock->nesting > 0);
 		_nest_lock->nesting++;
-		ret = 1;
+		ret = _nest_lock->nesting;
 	}
 	_starpu_spin_unlock(&_nest_lock->lock);
 	return ret;