diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2008-03-10 01:30:35 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2008-03-10 01:30:35 +0000 |
| commit | 1e24c28f465fc07cda02077c782afba9a8659066 (patch) | |
| tree | 136f65ae8dbd50fd9969fc33bc4df882f0c53d26 /sys/kern/sched_4bsd.c | |
| parent | 23a0c230344bc0b881fa2d3ce40fa8c2f6beabbd (diff) | |
Notes
Diffstat (limited to 'sys/kern/sched_4bsd.c')
| -rw-r--r-- | sys/kern/sched_4bsd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index fb744038ee45..834788c2faa8 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1244,6 +1244,17 @@ sched_choose(void) } void +sched_preempt(struct thread *td) +{ + thread_lock(td); + if (td->td_critnest > 1) + td->td_owepreempt = 1; + else + mi_switch(SW_INVOL | SW_PREEMPT, NULL); + thread_unlock(td); +} + +void sched_userret(struct thread *td) { /* |
