mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-30 12:07:34 +00:00
fixed test: eliminated race condition which might cause deadlock
llvm-svn: 372887
This commit is contained in:
parent
831a7e7068
commit
de44f434e8
@ -29,7 +29,6 @@ int main()
|
||||
{
|
||||
int i;
|
||||
int block = 1;
|
||||
int tid;
|
||||
int throttling = strcmp(getenv("KMP_ENABLE_TASK_THROTTLING"), "1") == 0;
|
||||
int enqueued = 0;
|
||||
int failed = -1;
|
||||
@ -41,6 +40,7 @@ int main()
|
||||
enqueued++;
|
||||
#pragma omp task
|
||||
{
|
||||
int tid;
|
||||
tid = omp_get_thread_num();
|
||||
if (tid == 0) {
|
||||
// As soon as the master thread starts executing task we should unlock
|
||||
|
Loading…
Reference in New Issue
Block a user