Deleted Added
full compact
kern_switch.c (111028) kern_switch.c (111032)
1/*
2 * Copyright (c) 2001 Jake Burkholder <jake@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 2001 Jake Burkholder <jake@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/kern/kern_switch.c 111028 2003-02-17 05:14:26Z jeff $
26 * $FreeBSD: head/sys/kern/kern_switch.c 111032 2003-02-17 09:55:10Z julian $
27 */
28
29/***
30
31Here is the logic..
32
33If there are N processors, then there are at most N KSEs (kernel
34schedulable entities) working to process threads that belong to a

--- 180 unchanged lines hidden (view full) ---

215
216 /*
217 * If we found one, assign it the kse, otherwise idle the kse.
218 */
219 if (td) {
220 kg->kg_last_assigned = td;
221 td->td_kse = ke;
222 ke->ke_thread = td;
27 */
28
29/***
30
31Here is the logic..
32
33If there are N processors, then there are at most N KSEs (kernel
34schedulable entities) working to process threads that belong to a

--- 180 unchanged lines hidden (view full) ---

215
216 /*
217 * If we found one, assign it the kse, otherwise idle the kse.
218 */
219 if (td) {
220 kg->kg_last_assigned = td;
221 td->td_kse = ke;
222 ke->ke_thread = td;
223 if (td->td_proc->p_sflag & PS_NEEDSIGCHK)
224 td->td_flags |= TDF_ASTPENDING;
223 sched_add(ke);
224 CTR2(KTR_RUNQ, "kse_reassign: ke%p -> td%p", ke, td);
225 return;
226 }
227
228 ke->ke_state = KES_IDLE;
229 ke->ke_thread = NULL;
230 TAILQ_INSERT_TAIL(&kg->kg_iq, ke, ke_kgrlist);

--- 503 unchanged lines hidden ---
225 sched_add(ke);
226 CTR2(KTR_RUNQ, "kse_reassign: ke%p -> td%p", ke, td);
227 return;
228 }
229
230 ke->ke_state = KES_IDLE;
231 ke->ke_thread = NULL;
232 TAILQ_INSERT_TAIL(&kg->kg_iq, ke, ke_kgrlist);

--- 503 unchanged lines hidden ---