Lines Matching refs:ptrlock
34 static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
36 ptrlock->ptr = ptr;
37 gomp_mutex_init (&ptrlock->lock);
40 static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
42 if (ptrlock->ptr != NULL)
43 return ptrlock->ptr;
45 gomp_mutex_lock (&ptrlock->lock);
46 if (ptrlock->ptr != NULL)
48 gomp_mutex_unlock (&ptrlock->lock);
49 return ptrlock->ptr;
55 static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
57 ptrlock->ptr = ptr;
58 gomp_mutex_unlock (&ptrlock->lock);
61 static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
63 gomp_mutex_destroy (&ptrlock->lock);