diff options
| author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
|---|---|---|
| committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
| commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
| tree | 644b88f8a71896307d71438e9b3af49126ffb22b /net/sunrpc/sched.c | |
| parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
| parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) | |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'net/sunrpc/sched.c')
| -rw-r--r-- | net/sunrpc/sched.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index cef74ba0666c..aae6907fd546 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
| @@ -210,6 +210,7 @@ void rpc_init_priority_wait_queue(struct rpc_wait_queue *queue, const char *qnam | |||
| 210 | { | 210 | { |
| 211 | __rpc_init_priority_wait_queue(queue, qname, RPC_NR_PRIORITY); | 211 | __rpc_init_priority_wait_queue(queue, qname, RPC_NR_PRIORITY); |
| 212 | } | 212 | } |
| 213 | EXPORT_SYMBOL_GPL(rpc_init_priority_wait_queue); | ||
| 213 | 214 | ||
| 214 | void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname) | 215 | void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname) |
| 215 | { | 216 | { |
| @@ -385,6 +386,20 @@ static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct r | |||
| 385 | } | 386 | } |
| 386 | 387 | ||
| 387 | /* | 388 | /* |
| 389 | * Tests whether rpc queue is empty | ||
| 390 | */ | ||
| 391 | int rpc_queue_empty(struct rpc_wait_queue *queue) | ||
| 392 | { | ||
| 393 | int res; | ||
| 394 | |||
| 395 | spin_lock_bh(&queue->lock); | ||
| 396 | res = queue->qlen; | ||
| 397 | spin_unlock_bh(&queue->lock); | ||
| 398 | return (res == 0); | ||
| 399 | } | ||
| 400 | EXPORT_SYMBOL_GPL(rpc_queue_empty); | ||
| 401 | |||
| 402 | /* | ||
| 388 | * Wake up a task on a specific queue | 403 | * Wake up a task on a specific queue |
| 389 | */ | 404 | */ |
| 390 | void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task) | 405 | void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task) |
