/* * @@name: lock_owner.1 * @@type: C * @@operation: link * @@expect: success * @@version: omp_5.1 */ #include #include #include int main() { int x; omp_lock_t lck; omp_init_lock (&lck); omp_set_lock (&lck); x = 0; #pragma omp parallel shared (x) { #pragma omp masked { x = x + 1; omp_unset_lock (&lck); } /* Some more stuff. */ } omp_destroy_lock (&lck); return 0; }