2 * ompt-signal.h -- Header providing low-level synchronization for tests
5 //===----------------------------------------------------------------------===//
7 // The LLVM Compiler Infrastructure
9 // This file is a copy from runtime/test/ompt/
11 //===----------------------------------------------------------------------===//
13 #if defined(WIN32) || defined(_WIN32)
15 #define delay() Sleep(1);
18 #define delay(t) usleep(t);
21 // These functions are used to provide a signal-wait mechanism to enforce
22 // expected scheduling for the test cases.
23 // Conditional variable (s) needs to be shared! Initialize to 0
25 #define OMPT_SIGNAL(s) ompt_signal(&s)
27 void ompt_signal(int *s
) {
32 #define OMPT_WAIT(s, v) ompt_wait(&s, v)
35 void ompt_wait(int *s
, int v
) {
39 #pragma omp atomic read