Index: runtime/src/kmp_lock.cpp =================================================================== --- runtime/src/kmp_lock.cpp +++ runtime/src/kmp_lock.cpp @@ -1456,6 +1456,7 @@ } dequeued = FALSE; } else { + KMP_MB(); tail = *tail_id_p; if (head == tail) { /* only one thread on the queue */ #ifdef DEBUG_QUEUING_LOCKS Index: runtime/test/worksharing/single/omp_single_copyprivate.c =================================================================== --- runtime/test/worksharing/single/omp_single_copyprivate.c +++ runtime/test/worksharing/single/omp_single_copyprivate.c @@ -13,7 +13,7 @@ result = 0; nr_iterations = 0; - #pragma omp parallel + #pragma omp parallel num_threads(4) { int i; for (i = 0; i < LOOPCOUNT; i++)