mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
rpc: add rpc_queue_empty function
Signed-off-by: Alexandros Batsakis <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
afe6c27ccb
commit
48f1861242
2 changed files with 15 additions and 0 deletions
|
|
@ -384,6 +384,20 @@ static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct r
|
|||
__rpc_do_wake_up_task(queue, task);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests whether rpc queue is empty
|
||||
*/
|
||||
int rpc_queue_empty(struct rpc_wait_queue *queue)
|
||||
{
|
||||
int res;
|
||||
|
||||
spin_lock_bh(&queue->lock);
|
||||
res = queue->qlen;
|
||||
spin_unlock_bh(&queue->lock);
|
||||
return (res == 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpc_queue_empty);
|
||||
|
||||
/*
|
||||
* Wake up a task on a specific queue
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue