Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1990
b: refs/heads/master
c: 6df3cec
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Jun 14, 2005
1 parent c30bc4e commit dbbbd03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f797f9cc5485b50c35c106b462e1bc432ec37f90
refs/heads/master: 6df3cecbb95345981718b38d357c50bc3425420a
7 changes: 5 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3755,19 +3755,22 @@ EXPORT_SYMBOL(cond_resched);
*/
int cond_resched_lock(spinlock_t * lock)
{
int ret = 0;

if (need_lockbreak(lock)) {
spin_unlock(lock);
cpu_relax();
ret = 1;
spin_lock(lock);
}
if (need_resched()) {
_raw_spin_unlock(lock);
preempt_enable_no_resched();
__cond_resched();
ret = 1;
spin_lock(lock);
return 1;
}
return 0;
return ret;
}

EXPORT_SYMBOL(cond_resched_lock);
Expand Down

0 comments on commit dbbbd03

Please sign in to comment.