sched_4bsd.c (130551) | sched_4bsd.c (130881) |
---|---|
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 130551 2004-06-16 00:26:31Z julian $"); | 36__FBSDID("$FreeBSD: head/sys/kern/sched_4bsd.c 130881 2004-06-21 22:05:46Z scottl $"); |
37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/ktr.h> 42#include <sys/lock.h> 43#include <sys/kthread.h> 44#include <sys/mutex.h> --- 102 unchanged lines hidden (view full) --- 147 return (error); 148 if (new_val < tick) 149 return (EINVAL); 150 sched_quantum = new_val / tick; 151 hogticks = 2 * sched_quantum; 152 return (0); 153} 154 | 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/ktr.h> 42#include <sys/lock.h> 43#include <sys/kthread.h> 44#include <sys/mutex.h> --- 102 unchanged lines hidden (view full) --- 147 return (error); 148 if (new_val < tick) 149 return (EINVAL); 150 sched_quantum = new_val / tick; 151 hogticks = 2 * sched_quantum; 152 return (0); 153} 154 |
155SYSCTL_PROC(_kern, OID_AUTO, quantum, CTLTYPE_INT|CTLFLAG_RW, | 155SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "SCHED"); 156 157#define SCHD_NAME "4bsd" 158#define SCHD_NAME_LEN 4 159SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFALG_RO, SCHD_NAME, SCHD_NAME_LEN, 160 "System is using the 4BSD scheduler"); 161 162SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT|CTLFLAG_RW, |
156 0, sizeof sched_quantum, sysctl_kern_quantum, "I", 157 "Roundrobin scheduling quantum in microseconds"); 158 159/* 160 * Arrange to reschedule if necessary, taking the priorities and 161 * schedulers into account. 162 */ 163static void --- 713 unchanged lines hidden --- | 163 0, sizeof sched_quantum, sysctl_kern_quantum, "I", 164 "Roundrobin scheduling quantum in microseconds"); 165 166/* 167 * Arrange to reschedule if necessary, taking the priorities and 168 * schedulers into account. 169 */ 170static void --- 713 unchanged lines hidden --- |