Lines Matching defs:lock

157 	 * @lock:
159 * Update side lock. Don't use directly, instead use the wrapper
163 * also use this lock to protect buffer object state like placement,
166 struct ww_mutex lock;
280 * &dma_resv.lock and using RCU instead. The cursor needs to be initialized
282 * the iterator a reference to the dma_fence is held and the RCU lock dropped.
287 * lock iterator dma_resv_for_each_fence() whenever possible.
301 * &dma_resv.lock. @all_fences controls if the shared fences are returned as
303 * valid as long as the lock is held and so no extra reference to the fence is
311 #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
312 #define dma_resv_assert_held(obj) lockdep_assert_held(&(obj)->lock.base)
321 * dma_resv_lock - lock the reservation object
326 * that the lock is only against other writers, readers will run concurrently
345 return ww_mutex_lock(&obj->lock, ctx);
349 * dma_resv_lock_interruptible - lock the reservation object
354 * modification. Note, that the lock is only against other writers, readers
372 return ww_mutex_lock_interruptible(&obj->lock, ctx);
376 * dma_resv_lock_slow - slowpath lock the reservation object
381 * will sleep until the lock becomes available. See dma_resv_lock() as
389 ww_mutex_lock_slow(&obj->lock, ctx);
393 * dma_resv_lock_slow_interruptible - slowpath lock the reservation
399 * will sleep until the lock becomes available. See
405 return ww_mutex_lock_slow_interruptible(&obj->lock, ctx);
412 * Tries to lock the reservation object for exclusive access and modification.
413 * Note, that the lock is only against other writers, readers will run
420 * Returns true if the lock was acquired, false otherwise.
424 return ww_mutex_trylock(&obj->lock, NULL);
435 return ww_mutex_is_locked(&obj->lock);
439 * dma_resv_locking_ctx - returns the context used to lock the object
442 * Returns the context used to lock a reservation object or NULL if no context
452 return READ_ONCE(obj->lock.ctx);
464 ww_mutex_unlock(&obj->lock);