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

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

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
39#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.

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

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
39#include <sys/cdefs.h>
40__FBSDID("$FreeBSD: head/sys/kern/sched_4bsd.c 125295 2004-02-01 06:20:18Z jeff $");
40__FBSDID("$FreeBSD: head/sys/kern/sched_4bsd.c 126326 2004-02-27 18:52:44Z jhb $");
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/ktr.h>
46#include <sys/lock.h>
47#include <sys/kthread.h>
48#include <sys/mutex.h>

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

617 if (TD_ON_RUNQ(td)) {
618 adjustrunqueue(td, prio);
619 } else {
620 td->td_priority = prio;
621 }
622}
623
624void
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/ktr.h>
46#include <sys/lock.h>
47#include <sys/kthread.h>
48#include <sys/mutex.h>

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

617 if (TD_ON_RUNQ(td)) {
618 adjustrunqueue(td, prio);
619 } else {
620 td->td_priority = prio;
621 }
622}
623
624void
625sched_sleep(struct thread *td, u_char prio)
625sched_sleep(struct thread *td)
626{
627
628 mtx_assert(&sched_lock, MA_OWNED);
629 td->td_ksegrp->kg_slptime = 0;
626{
627
628 mtx_assert(&sched_lock, MA_OWNED);
629 td->td_ksegrp->kg_slptime = 0;
630 td->td_priority = prio;
630 td->td_base_pri = td->td_priority;
631}
632
633void
634sched_switch(struct thread *td)
635{
636 struct thread *newtd;
637 struct kse *ke;
638 struct proc *p;

--- 239 unchanged lines hidden ---
631}
632
633void
634sched_switch(struct thread *td)
635{
636 struct thread *newtd;
637 struct kse *ke;
638 struct proc *p;

--- 239 unchanged lines hidden ---