Deleted Added
full compact
ksched.c (219028) ksched.c (222802)
1/*-
2 * Copyright (c) 1996, 1997
3 * HD Associates, Inc. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33/* ksched: Soft real time scheduling based on "rtprio".
34 */
35
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1996, 1997
3 * HD Associates, Inc. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33/* ksched: Soft real time scheduling based on "rtprio".
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/kern/ksched.c 219028 2011-02-25 10:11:01Z netchild $");
37__FBSDID("$FreeBSD: head/sys/kern/ksched.c 222802 2011-06-07 02:50:14Z davidxu $");
38
39#include "opt_posix.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/lock.h>
44#include <sys/sysctl.h>
45#include <sys/kernel.h>

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

201
202
203 break;
204
205 case SCHED_OTHER:
206 if (param->sched_priority >= 0 &&
207 param->sched_priority <= (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) {
208 rtp.type = RTP_PRIO_NORMAL;
38
39#include "opt_posix.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/lock.h>
44#include <sys/sysctl.h>
45#include <sys/kernel.h>

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

201
202
203 break;
204
205 case SCHED_OTHER:
206 if (param->sched_priority >= 0 &&
207 param->sched_priority <= (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) {
208 rtp.type = RTP_PRIO_NORMAL;
209 rtp.prio = p4prio_to_rtpprio(param->sched_priority);
209 rtp.prio = p4prio_to_tsprio(param->sched_priority);
210 rtp_to_pri(&rtp, td);
211 } else
212 e = EINVAL;
213
214 break;
215
216 default:
217 e = EINVAL;

--- 75 unchanged lines hidden ---
210 rtp_to_pri(&rtp, td);
211 } else
212 e = EINVAL;
213
214 break;
215
216 default:
217 e = EINVAL;

--- 75 unchanged lines hidden ---