Lines Matching refs:p_lock
122 static inline void cl_plock_construct(IN cl_plock_t * const p_lock)
124 CL_ASSERT(p_lock);
126 p_lock->state = CL_UNINITIALIZED;
131 * p_lock
157 static inline void cl_plock_destroy(IN cl_plock_t * const p_lock)
159 CL_ASSERT(p_lock);
160 p_lock->state = CL_DESTROYING;
161 pthread_rwlock_destroy(&p_lock->lock);
162 p_lock->state = CL_DESTROYED;
167 * p_lock
194 static inline cl_status_t cl_plock_init(IN cl_plock_t * const p_lock)
198 CL_ASSERT(p_lock);
199 status = pthread_rwlock_init(&p_lock->lock, NULL);
202 p_lock->state = CL_INITIALIZED;
208 * p_lock
235 static inline void cl_plock_acquire(IN cl_plock_t * const p_lock)
238 CL_ASSERT(p_lock);
239 CL_ASSERT(p_lock->state == CL_INITIALIZED);
241 status = pthread_rwlock_rdlock(&p_lock->lock);
247 * p_lock
267 static inline void cl_plock_excl_acquire(IN cl_plock_t * const p_lock)
271 CL_ASSERT(p_lock);
272 CL_ASSERT(p_lock->state == CL_INITIALIZED);
274 status = pthread_rwlock_wrlock(&p_lock->lock);
280 * p_lock
300 static inline void cl_plock_release(IN cl_plock_t * const p_lock)
303 CL_ASSERT(p_lock);
304 CL_ASSERT(p_lock->state == CL_INITIALIZED);
306 status = pthread_rwlock_unlock(&p_lock->lock);
312 * p_lock