core.c (c5491ea779793f977d282754db478157cc409d82) | core.c (ba74c1448f127649046615ec017bded7b2a76f29) |
---|---|
1/* 2 * kernel/sched/core.c 3 * 4 * Kernel scheduler and related syscalls 5 * 6 * Copyright (C) 1991-2002 Linus Torvalds 7 * 8 * 1996-12-23 Modified by Dave Grothe to fix bugs in semaphores and --- 3206 unchanged lines hidden (view full) --- 3215 */ 3216 cpu = smp_processor_id(); 3217 rq = cpu_rq(cpu); 3218 } else 3219 raw_spin_unlock_irq(&rq->lock); 3220 3221 post_schedule(rq); 3222 | 1/* 2 * kernel/sched/core.c 3 * 4 * Kernel scheduler and related syscalls 5 * 6 * Copyright (C) 1991-2002 Linus Torvalds 7 * 8 * 1996-12-23 Modified by Dave Grothe to fix bugs in semaphores and --- 3206 unchanged lines hidden (view full) --- 3215 */ 3216 cpu = smp_processor_id(); 3217 rq = cpu_rq(cpu); 3218 } else 3219 raw_spin_unlock_irq(&rq->lock); 3220 3221 post_schedule(rq); 3222 |
3223 preempt_enable_no_resched(); | 3223 sched_preempt_enable_no_resched(); |
3224 if (need_resched()) 3225 goto need_resched; 3226} 3227 3228static inline void sched_submit_work(struct task_struct *tsk) 3229{ 3230 if (!tsk->state) 3231 return; --- 16 unchanged lines hidden (view full) --- 3248 3249/** 3250 * schedule_preempt_disabled - called with preemption disabled 3251 * 3252 * Returns with preemption disabled. Note: preempt_count must be 1 3253 */ 3254void __sched schedule_preempt_disabled(void) 3255{ | 3224 if (need_resched()) 3225 goto need_resched; 3226} 3227 3228static inline void sched_submit_work(struct task_struct *tsk) 3229{ 3230 if (!tsk->state) 3231 return; --- 16 unchanged lines hidden (view full) --- 3248 3249/** 3250 * schedule_preempt_disabled - called with preemption disabled 3251 * 3252 * Returns with preemption disabled. Note: preempt_count must be 1 3253 */ 3254void __sched schedule_preempt_disabled(void) 3255{ |
3256 preempt_enable_no_resched(); | 3256 sched_preempt_enable_no_resched(); |
3257 schedule(); 3258 preempt_disable(); 3259} 3260 3261#ifdef CONFIG_MUTEX_SPIN_ON_OWNER 3262 3263static inline bool owner_running(struct mutex *lock, struct task_struct *owner) 3264{ --- 1216 unchanged lines hidden (view full) --- 4481 4482 /* 4483 * Since we are going to call schedule() anyway, there's 4484 * no need to preempt or enable interrupts: 4485 */ 4486 __release(rq->lock); 4487 spin_release(&rq->lock.dep_map, 1, _THIS_IP_); 4488 do_raw_spin_unlock(&rq->lock); | 3257 schedule(); 3258 preempt_disable(); 3259} 3260 3261#ifdef CONFIG_MUTEX_SPIN_ON_OWNER 3262 3263static inline bool owner_running(struct mutex *lock, struct task_struct *owner) 3264{ --- 1216 unchanged lines hidden (view full) --- 4481 4482 /* 4483 * Since we are going to call schedule() anyway, there's 4484 * no need to preempt or enable interrupts: 4485 */ 4486 __release(rq->lock); 4487 spin_release(&rq->lock.dep_map, 1, _THIS_IP_); 4488 do_raw_spin_unlock(&rq->lock); |
4489 preempt_enable_no_resched(); | 4489 sched_preempt_enable_no_resched(); |
4490 4491 schedule(); 4492 4493 return 0; 4494} 4495 4496static inline int should_resched(void) 4497{ --- 3659 unchanged lines hidden --- | 4490 4491 schedule(); 4492 4493 return 0; 4494} 4495 4496static inline int should_resched(void) 4497{ --- 3659 unchanged lines hidden --- |