4 #ifndef NO_OPENMP_SPINLOCK
13 #ifndef NO_OPENMP_SPINLOCK
24 #ifndef NO_OPENMP_SPINLOCK
31 #ifndef NO_OPENMP_SPINLOCK
40 #ifndef NO_OPENMP_SPINLOCK
53 #ifndef NO_OPENMP_SPINLOCK
55 #pragma omp parallel for
59 for(i = 0; i < NumLock; i ++) {
60 #ifndef NO_OPENMP_SPINLOCK
61 pthread_spin_init(&
spin.
SpinLocks[i], PTHREAD_PROCESS_PRIVATE);
74 #ifndef NO_OPENMP_SPINLOCK
#define mymalloc(name, size)
void free_spinlocks(struct SpinLocks *spin)
int try_lock_spinlock(int i, struct SpinLocks *spin)
void lock_spinlock(int i, struct SpinLocks *spin)
struct SpinLocks * init_spinlocks(int NumLock)
static struct SpinLocks spin
void unlock_spinlock(int i, struct SpinLocks *spin)
pthread_spinlock_t * SpinLocks