static int ptlrpc_pinger_main(void *arg)
{
- struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
+ struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
ENTRY;
- /* Record that the thread is running */
- thread_set_flags(thread, SVC_RUNNING);
- cfs_waitq_signal(&thread->t_ctl_waitq);
+ /* Record that the thread is running */
+ thread_set_flags(thread, SVC_RUNNING);
+ wake_up(&thread->t_ctl_waitq);
- /* And now, loop forever, pinging as needed. */
- while (1) {
- cfs_time_t this_ping = cfs_time_current();
- struct l_wait_info lwi;
- cfs_duration_t time_to_next_wake;
- struct timeout_item *item;
- cfs_list_t *iter;
+ /* And now, loop forever, pinging as needed. */
+ while (1) {
+ cfs_time_t this_ping = cfs_time_current();
+ struct l_wait_info lwi;
+ cfs_duration_t time_to_next_wake;
+ struct timeout_item *item;
+ cfs_list_t *iter;
mutex_lock(&pinger_mutex);
cfs_list_for_each_entry(item, &timeout_list, ti_chain) {
}
thread_set_flags(thread, SVC_STOPPED);
- cfs_waitq_signal(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
CDEBUG(D_NET, "pinger thread exiting, process %d\n", current_pid());
return 0;
!thread_is_stopped(&pinger_thread))
RETURN(-EALREADY);
- cfs_waitq_init(&pinger_thread.t_ctl_waitq);
+ init_waitqueue_head(&pinger_thread.t_ctl_waitq);
strcpy(pinger_thread.t_name, "ll_ping");
ptlrpc_pinger_remove_timeouts();
thread_set_flags(&pinger_thread, SVC_STOPPING);
- cfs_waitq_signal(&pinger_thread.t_ctl_waitq);
+ wake_up(&pinger_thread.t_ctl_waitq);
l_wait_event(pinger_thread.t_ctl_waitq,
thread_is_stopped(&pinger_thread), &lwi);
{
#ifdef ENABLE_PINGER
thread_add_flags(&pinger_thread, SVC_EVENT);
- cfs_waitq_signal(&pinger_thread.t_ctl_waitq);
+ wake_up(&pinger_thread.t_ctl_waitq);
#endif
}
static int pet_refcount = 0;
static int pet_state;
-static cfs_waitq_t pet_waitq;
+static wait_queue_head_t pet_waitq;
CFS_LIST_HEAD(pet_list);
static DEFINE_SPINLOCK(pet_lock);
}
spin_unlock(&pet_lock);
- cfs_waitq_signal(&pet_waitq);
+ wake_up(&pet_waitq);
return 0;
}
if (++pet_refcount > 1)
return;
- cfs_waitq_init(&pet_waitq);
+ init_waitqueue_head(&pet_waitq);
task = kthread_run(ping_evictor_main, NULL, "ll_evictor");
if (IS_ERR(task)) {
return;
pet_state = PET_TERMINATE;
- cfs_waitq_signal(&pet_waitq);
+ wake_up(&pet_waitq);
}
EXPORT_SYMBOL(ping_evictor_stop);
#else /* !__KERNEL__ */