sched_4bsd.c (310129) | sched_4bsd.c (312665) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 19 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 19 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: stable/11/sys/kern/sched_4bsd.c 310129 2016-12-15 22:39:52Z jhb $"); | 36__FBSDID("$FreeBSD: stable/11/sys/kern/sched_4bsd.c 312665 2017-01-23 08:34:41Z avg $"); |
37 38#include "opt_hwpmc_hooks.h" 39#include "opt_sched.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/cpuset.h> 44#include <sys/kernel.h> --- 918 unchanged lines hidden (view full) --- 963 mtx_lock_spin(&sched_lock); 964 tmtx = thread_lock_block(td); 965 } 966 967 if ((td->td_flags & TDF_NOLOAD) == 0) 968 sched_load_rem(); 969 970 td->td_lastcpu = td->td_oncpu; | 37 38#include "opt_hwpmc_hooks.h" 39#include "opt_sched.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/cpuset.h> 44#include <sys/kernel.h> --- 918 unchanged lines hidden (view full) --- 963 mtx_lock_spin(&sched_lock); 964 tmtx = thread_lock_block(td); 965 } 966 967 if ((td->td_flags & TDF_NOLOAD) == 0) 968 sched_load_rem(); 969 970 td->td_lastcpu = td->td_oncpu; |
971 preempted = !((td->td_flags & TDF_SLICEEND) || 972 (flags & SWT_RELINQUISH)); | 971 preempted = (td->td_flags & TDF_SLICEEND) == 0 && 972 (flags & SW_PREEMPT) != 0; |
973 td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); 974 td->td_owepreempt = 0; 975 td->td_oncpu = NOCPU; 976 977 /* 978 * At the last moment, if this thread is still marked RUNNING, 979 * then put it back on the run queue as it has not been suspended 980 * or stopped or any thing else similar. We never put the idle --- 780 unchanged lines hidden --- | 973 td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); 974 td->td_owepreempt = 0; 975 td->td_oncpu = NOCPU; 976 977 /* 978 * At the last moment, if this thread is still marked RUNNING, 979 * then put it back on the run queue as it has not been suspended 980 * or stopped or any thing else similar. We never put the idle --- 780 unchanged lines hidden --- |