Lines Matching defs:lock
35 * of the DRM heavyweight hardware lock.
36 * The lock is a read-write lock. Taking it in read mode and write mode
41 * It's allowed to leave kernel space with the vt lock held.
42 * If a user-space process dies while having the vt-lock,
43 * it will be released during the file descriptor release. The vt lock
44 * excludes write lock and read lock.
46 * The suspend mode is used to lock out all TTM users when preparing for
66 * @base: ttm base object used solely to release the lock if the client
67 * holding the lock dies.
68 * @queue: Queue for processes waiting for lock change-of-status.
69 * @lock: Spinlock protecting some lock members.
70 * @rw: Read-write lock counter. Protected by @lock.
71 * @flags: Lock state. Protected by @lock.
77 spinlock_t lock;
86 * @lock: Pointer to a struct ttm_lock
87 * Initializes the lock.
89 extern void ttm_lock_init(struct ttm_lock *lock);
94 * @lock: Pointer to a struct ttm_lock
96 * Releases a read lock.
98 extern void ttm_read_unlock(struct ttm_lock *lock);
103 * @lock: Pointer to a struct ttm_lock
104 * @interruptible: Interruptible sleeping while waiting for a lock.
106 * Takes the lock in read mode.
110 extern int ttm_read_lock(struct ttm_lock *lock, bool interruptible);
115 * @lock: Pointer to a struct ttm_lock
116 * @interruptible: Interruptible sleeping while waiting for a lock.
118 * Tries to take the lock in read mode. If the lock is already held
119 * in write mode, the function will return -EBUSY. If the lock is held
124 * -EBUSY The lock was already held in write mode.
127 extern int ttm_read_trylock(struct ttm_lock *lock, bool interruptible);
132 * @lock: Pointer to a struct ttm_lock
134 * Releases a write lock.
136 extern void ttm_write_unlock(struct ttm_lock *lock);
141 * @lock: Pointer to a struct ttm_lock
142 * @interruptible: Interruptible sleeping while waiting for a lock.
144 * Takes the lock in write mode.
148 extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);
153 * @lock: Pointer to a struct ttm_lock
155 * Downgrades a write lock to a read lock.
157 extern void ttm_lock_downgrade(struct ttm_lock *lock);
162 * @lock: Pointer to a struct ttm_lock
164 * Takes the lock in suspend mode. Excludes read and write mode.
166 extern void ttm_suspend_lock(struct ttm_lock *lock);
171 * @lock: Pointer to a struct ttm_lock
173 * Releases a suspend lock
175 extern void ttm_suspend_unlock(struct ttm_lock *lock);
180 * @lock: Pointer to a struct ttm_lock
181 * @interruptible: Interruptible sleeping while waiting for a lock.
182 * @tfile: Pointer to a struct ttm_object_file to register the lock with.
184 * Takes the lock in vt mode.
189 extern int ttm_vt_lock(struct ttm_lock *lock, bool interruptible,
195 * @lock: Pointer to a struct ttm_lock
197 * Releases a vt lock.
199 * -EINVAL If the lock was not held.
201 extern int ttm_vt_unlock(struct ttm_lock *lock);
206 * @lock: Pointer to a struct ttm_lock
208 * Releases a write lock.
210 extern void ttm_write_unlock(struct ttm_lock *lock);
215 * @lock: Pointer to a struct ttm_lock
216 * @interruptible: Interruptible sleeping while waiting for a lock.
218 * Takes the lock in write mode.
222 extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);