00001 /* This header is used during the build process to find the size and 00002 alignment of the public OpenMP locks, so that we can export data 00003 structures without polluting the namespace. 00004 00005 In this POSIX95 implementation, we map the two locks to the 00006 same PTHREADS primitive. */ 00007 00008 #include <pthread.h> 00009 #include <semaphore.h> 00010 00011 typedef pthread_mutex_t omp_lock_25_t; 00012 typedef struct { pthread_mutex_t lock; pthread_t owner; int count; } omp_nest_lock_25_t; 00013 #ifdef HAVE_BROKEN_POSIX_SEMAPHORES 00014 /* If we don't have working semaphores, we'll make all explicit tasks 00015 tied to the creating thread. */ 00016 typedef pthread_mutex_t omp_lock_t; 00017 typedef struct { pthread_mutex_t lock; int count; void *owner; } omp_nest_lock_t; 00018 #else 00019 typedef sem_t omp_lock_t; 00020 typedef struct { sem_t lock; int count; void *owner; } omp_nest_lock_t; 00021 #endif