aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorAlexandros Batsakis <batsakis@netapp.com>2009-12-15 00:27:53 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-15 13:51:17 -0500
commit48f186124220794fce85ed1439fc32f16f69d3e2 (patch)
treec200395b4238a19d6653b23a43537ac29b7b8cf4 /net/sunrpc
parentafe6c27ccb8cc31ce8ed0bd3589ce549f523c8e7 (diff)
rpc: add rpc_queue_empty function
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/sched.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index cef74ba0666c..89ea8e69ec78 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -385,6 +385,20 @@ static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct r
385} 385}
386 386
387/* 387/*
388 * Tests whether rpc queue is empty
389 */
390int rpc_queue_empty(struct rpc_wait_queue *queue)
391{
392 int res;
393
394 spin_lock_bh(&queue->lock);
395 res = queue->qlen;
396 spin_unlock_bh(&queue->lock);
397 return (res == 0);
398}
399EXPORT_SYMBOL_GPL(rpc_queue_empty);
400
401/*
388 * Wake up a task on a specific queue 402 * Wake up a task on a specific queue
389 */ 403 */
390void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task) 404void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task)