rtsched.c revision d4204c85a44d2589b9afff2c81db7044e97f2d1d
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "lint.h"
#include "thr_uberdata.h"
#include <sched.h>
#include <sys/priocntl.h>
#include <sys/rtpriocntl.h>
#include <sys/tspriocntl.h>
/*
* The following variables are used for caching information
* for priocntl TS and RT scheduling classs.
*/
static int rt_rrmin;
static int rt_rrmax;
static int rt_fifomin;
static int rt_fifomax;
static int rt_othermin;
static int rt_othermax;
/*
*/
int
{
int rt = 0;
(policy == SCHED_OTHER)));
rt = 1;
}
if (rt) {
} else {
}
return (errno);
}
if (rt) {
} else {
}
return (errno);
}
return (0);
}
/*
* Get SCHED_FIFO, SCHED_RR, SCHED_OTHER priority ranges.
*/
static void
{
}
/*
* Validate priorities.
*/
int
{
static int initialized = 0;
if (!initialized) {
if (!initialized) { /* do this only once */
initialized = 1;
}
}
switch (policy) {
case SCHED_FIFO:
case SCHED_RR:
case SCHED_OTHER:
}
return (1);
}