Deleted Added
full compact
sched_4bsd.c (147565) sched_4bsd.c (157815)
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: head/sys/kern/sched_4bsd.c 147565 2005-06-24 00:16:57Z peter $");
36__FBSDID("$FreeBSD: head/sys/kern/sched_4bsd.c 157815 2006-04-17 18:20:38Z jhb $");
37
38#include "opt_hwpmc_hooks.h"
39
40#define kse td_sched
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>

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

538 */
539static void
540schedcpu_thread(void)
541{
542 int nowake;
543
544 for (;;) {
545 schedcpu();
37
38#include "opt_hwpmc_hooks.h"
39
40#define kse td_sched
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>

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

538 */
539static void
540schedcpu_thread(void)
541{
542 int nowake;
543
544 for (;;) {
545 schedcpu();
546 tsleep(&nowake, curthread->td_priority, "-", hz);
546 tsleep(&nowake, 0, "-", hz);
547 }
548}
549
550/*
551 * Recalculate the priority of a process after it has slept for a while.
552 * For all load averages >= 1 and max kg_estcpu of 255, sleeping for at
553 * least six times the loadfactor will decay kg_estcpu to zero.
554 */

--- 836 unchanged lines hidden ---
547 }
548}
549
550/*
551 * Recalculate the priority of a process after it has slept for a while.
552 * For all load averages >= 1 and max kg_estcpu of 255, sleeping for at
553 * least six times the loadfactor will decay kg_estcpu to zero.
554 */

--- 836 unchanged lines hidden ---