sched_ule.c (112994) | sched_ule.c (113339) |
---|---|
1/*- 2 * Copyright (c) 2003, Jeffrey Roberson <jeff@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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2003, Jeffrey Roberson <jeff@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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/kern/sched_ule.c 112994 2003-04-03 00:29:28Z jeff $ | 26 * $FreeBSD: head/sys/kern/sched_ule.c 113339 2003-04-10 17:35:44Z julian $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/kernel.h> 32#include <sys/ktr.h> 33#include <sys/lock.h> 34#include <sys/mutex.h> --- 603 unchanged lines hidden (view full) --- 638{ 639 struct kse *ke; 640 641 mtx_assert(&sched_lock, MA_OWNED); 642 643 ke = td->td_kse; 644 645 td->td_last_kse = ke; | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/kernel.h> 32#include <sys/ktr.h> 33#include <sys/lock.h> 34#include <sys/mutex.h> --- 603 unchanged lines hidden (view full) --- 638{ 639 struct kse *ke; 640 641 mtx_assert(&sched_lock, MA_OWNED); 642 643 ke = td->td_kse; 644 645 td->td_last_kse = ke; |
646 td->td_lastcpu = ke->ke_oncpu; 647 ke->ke_oncpu = NOCPU; | 646 td->td_lastcpu = td->td_oncpu; 647 td->td_oncpu = NOCPU; |
648 td->td_flags &= ~TDF_NEEDRESCHED; 649 650 if (TD_IS_RUNNING(td)) { 651 setrunqueue(td); 652 return; 653 } 654 td->td_kse->ke_runq = NULL; 655 --- 6 unchanged lines hidden (view full) --- 662} 663 664void 665sched_switchin(struct thread *td) 666{ 667 /* struct kse *ke = td->td_kse; */ 668 mtx_assert(&sched_lock, MA_OWNED); 669 | 648 td->td_flags &= ~TDF_NEEDRESCHED; 649 650 if (TD_IS_RUNNING(td)) { 651 setrunqueue(td); 652 return; 653 } 654 td->td_kse->ke_runq = NULL; 655 --- 6 unchanged lines hidden (view full) --- 662} 663 664void 665sched_switchin(struct thread *td) 666{ 667 /* struct kse *ke = td->td_kse; */ 668 mtx_assert(&sched_lock, MA_OWNED); 669 |
670 td->td_kse->ke_oncpu = PCPU_GET(cpuid); | 670 td->td_oncpu = PCPU_GET(cpuid); |
671#if SCHED_STRICT_RESCHED 672 if (td->td_ksegrp->kg_pri_class == PRI_TIMESHARE && 673 td->td_priority != td->td_ksegrp->kg_user_pri) 674 curthread->td_flags |= TDF_NEEDRESCHED; 675#endif 676} 677 678void --- 385 unchanged lines hidden --- | 671#if SCHED_STRICT_RESCHED 672 if (td->td_ksegrp->kg_pri_class == PRI_TIMESHARE && 673 td->td_priority != td->td_ksegrp->kg_user_pri) 674 curthread->td_flags |= TDF_NEEDRESCHED; 675#endif 676} 677 678void --- 385 unchanged lines hidden --- |