Lines Matching refs:ls
12 static inline int no_work(struct gdlm_ls *ls) in no_work() argument
16 spin_lock(&ls->async_lock); in no_work()
17 ret = list_empty(&ls->submit); in no_work()
18 spin_unlock(&ls->async_lock); in no_work()
25 struct gdlm_ls *ls = (struct gdlm_ls *) data; in gdlm_thread() local
29 wait_event_interruptible(ls->thread_wait, in gdlm_thread()
30 !no_work(ls) || kthread_should_stop()); in gdlm_thread()
32 spin_lock(&ls->async_lock); in gdlm_thread()
34 if (!list_empty(&ls->submit)) { in gdlm_thread()
35 lp = list_entry(ls->submit.next, struct gdlm_lock, in gdlm_thread()
38 spin_unlock(&ls->async_lock); in gdlm_thread()
40 spin_lock(&ls->async_lock); in gdlm_thread()
42 spin_unlock(&ls->async_lock); in gdlm_thread()
48 int gdlm_init_threads(struct gdlm_ls *ls) in gdlm_init_threads() argument
53 p = kthread_run(gdlm_thread, ls, "lock_dlm"); in gdlm_init_threads()
59 ls->thread = p; in gdlm_init_threads()
64 void gdlm_release_threads(struct gdlm_ls *ls) in gdlm_release_threads() argument
66 kthread_stop(ls->thread); in gdlm_release_threads()