Lines Matching refs:flags

52 	lock->flags = 0;  in ttm_lock_init()
84 if (lock->rw >= 0 && lock->flags == 0) { in __ttm_read_lock()
95 int flags, ret; in ttm_read_lock() local
99 flags = PCATCH; in ttm_read_lock()
102 flags = 0; in ttm_read_lock()
107 ret = -msleep(lock, &lock->lock, flags, wmsg, 0); in ttm_read_lock()
126 if (lock->rw >= 0 && lock->flags == 0) { in __ttm_read_trylock()
130 } else if (lock->flags == 0) { in __ttm_read_trylock()
140 int flags, ret; in ttm_read_trylock() local
145 flags = PCATCH; in ttm_read_trylock()
148 flags = 0; in ttm_read_trylock()
153 ret = -msleep(lock, &lock->lock, flags, wmsg, 0); in ttm_read_trylock()
181 if (lock->rw == 0 && ((lock->flags & ~TTM_WRITE_LOCK_PENDING) == 0)) { in __ttm_write_lock()
183 lock->flags &= ~TTM_WRITE_LOCK_PENDING; in __ttm_write_lock()
186 lock->flags |= TTM_WRITE_LOCK_PENDING; in __ttm_write_lock()
195 int flags, ret; in ttm_write_lock() local
199 flags = PCATCH; in ttm_write_lock()
202 flags = 0; in ttm_write_lock()
208 ret = -msleep(lock, &lock->lock, flags, wmsg, 0); in ttm_write_lock()
212 lock->flags &= ~TTM_WRITE_LOCK_PENDING; in ttm_write_lock()
235 if (unlikely(!(lock->flags & TTM_VT_LOCK))) in __ttm_vt_unlock()
237 lock->flags &= ~TTM_VT_LOCK; in __ttm_vt_unlock()
260 lock->flags &= ~TTM_VT_LOCK_PENDING; in __ttm_vt_lock()
261 lock->flags |= TTM_VT_LOCK; in __ttm_vt_lock()
264 lock->flags |= TTM_VT_LOCK_PENDING; in __ttm_vt_lock()
274 int flags, ret; in ttm_vt_lock() local
278 flags = PCATCH; in ttm_vt_lock()
281 flags = 0; in ttm_vt_lock()
286 ret = -msleep(lock, &lock->lock, flags, wmsg, 0); in ttm_vt_lock()
290 lock->flags &= ~TTM_VT_LOCK_PENDING; in ttm_vt_lock()
321 lock->flags &= ~TTM_SUSPEND_LOCK; in ttm_suspend_unlock()
331 lock->flags &= ~TTM_SUSPEND_LOCK_PENDING; in __ttm_suspend_lock()
332 lock->flags |= TTM_SUSPEND_LOCK; in __ttm_suspend_lock()
335 lock->flags |= TTM_SUSPEND_LOCK_PENDING; in __ttm_suspend_lock()