1/* 2 * Copyright (c) 2014 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9#include <bomp_internal.h> 10 11/* 12 * These functions implement the OpenMP CRITICAL construct 13 * 14 * With a specified name, use omp set lock and omp unset lock with name being 15 * transformed into a variable declared like 16 * 17 * omp_lock_t gomp_critical_user_<name> __attribute__((common)) 18 * Ideally the ABI would specify that all zero is a valid unlocked state, and 19 * so we wouldn���t need to initialize this at startup. 20 */ 21 22void GOMP_critical_start(void) 23{ 24 assert(g_bomp_state); 25 bomp_mutex_lock(&g_bomp_state->critical_lock); 26} 27 28void GOMP_critical_end(void) 29{ 30 assert(g_bomp_state); 31 bomp_mutex_unlock(&g_bomp_state->critical_lock); 32} 33 34void GOMP_critical_name_start(void **pptr) 35{ 36 assert(!"NYI"); 37} 38 39void GOMP_critical_name_end(void **pptr) 40{ 41 assert(!"NYI"); 42} 43