Deleted Added
full compact
sched_4bsd.c (111128) sched_4bsd.c (111585)
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.

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

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
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.

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

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * $FreeBSD: head/sys/kern/sched_4bsd.c 111128 2003-02-19 13:36:51Z davidxu $
38 * $FreeBSD: head/sys/kern/sched_4bsd.c 111585 2003-02-27 02:05:19Z julian $
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>
44#include <sys/ktr.h>
45#include <sys/lock.h>
46#include <sys/mutex.h>

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

539 /*
540 * At the last moment, if this thread is still marked RUNNING,
541 * then put it back on the run queue as it has not been suspended
542 * or stopped or any thing else similar.
543 */
544 if (TD_IS_RUNNING(td)) {
545 /* Put us back on the run queue (kse and all). */
546 setrunqueue(td);
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>
44#include <sys/ktr.h>
45#include <sys/lock.h>
46#include <sys/mutex.h>

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

539 /*
540 * At the last moment, if this thread is still marked RUNNING,
541 * then put it back on the run queue as it has not been suspended
542 * or stopped or any thing else similar.
543 */
544 if (TD_IS_RUNNING(td)) {
545 /* Put us back on the run queue (kse and all). */
546 setrunqueue(td);
547 } else if (p->p_flag & P_KSES) {
547 } else if (p->p_flag & P_THREADED) {
548 /*
549 * We will not be on the run queue. So we must be
550 * sleeping or similar. As it's available,
551 * someone else can use the KSE if they need it.
552 */
553 kse_reassign(ke);
554 }
555}

--- 113 unchanged lines hidden ---
548 /*
549 * We will not be on the run queue. So we must be
550 * sleeping or similar. As it's available,
551 * someone else can use the KSE if they need it.
552 */
553 kse_reassign(ke);
554 }
555}

--- 113 unchanged lines hidden ---