User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | kernel/sched.c |
Line in file: | 5665 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-29 20:11:37 UTC |
5635 5636/** 5637 * yield - yield the current processor to other threads. 5638 * 5639 * This is a shortcut for kernel-space yielding - it marks the 5640 * thread runnable and calls sys_sched_yield(). 5641 */ 5642void __sched yield(void) 5643{ 5644 set_current_state(TASK_RUNNING); 5645 sys_sched_yield(); 5646} 5647EXPORT_SYMBOL(yield); 5648 5649/* 5650 * This task is about to go to sleep on IO. Increment rq->nr_iowait so 5651 * that process accounting knows that this is a task in IO wait state. 5652 * 5653 * But don't do that if it is a deliberate, throttling IO wait (this task 5654 * has set its backing_dev_info: the queue against which it should throttle) 5655 */ 5656void __sched io_schedule(void) 5657{ 5658 struct rq *rq = &__raw_get_cpu_var(runqueues); 5659 5660 delayacct_blkio_start(); 5661 atomic_inc(&rq->nr_iowait); 5662 schedule(); 5663 atomic_dec(&rq->nr_iowait); 5664 delayacct_blkio_end(); 5665} 5666EXPORT_SYMBOL(io_schedule); 5667 5668long __sched io_schedule_timeout(long timeout) 5669{ 5670 struct rq *rq = &__raw_get_cpu_var(runqueues); 5671 long ret; 5672 5673 delayacct_blkio_start(); 5674 atomic_inc(&rq->nr_iowait); 5675 ret = schedule_timeout(timeout);