lx_sched.c revision 9acbbeaf2a1ffe5c14b244867d427714fab43c5c
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/rtpriocntl.h>
#include <sys/tspriocntl.h>
#include <sys/processor.h>
#include <sys/lx_sched.h>
#include <sys/lx_brand.h>
int
{
/*
* The caller wants to know how large the mask should be.
*/
*rval = sizeof (lx_affmask_t);
return (0);
}
/*
* Otherwise, ensure they have a large enough mask.
*/
*rval = -1;
}
if (pid == 0) {
}
/*
* For now, we only support manipulating threads in the
* same process.
*/
/*
* We must hold the process lock so that the thread list
* doesn't change while we're looking at it. We'll hold
* the lock until we no longer reference the
* corresponding lwp.
*/
do {
break;
t = t->t_forw;
} while (t != curthread);
/*
* If the given PID is in the current thread's process,
* then we _must_ find it in the process's thread list.
*/
if (cmd == B_SET_AFFINITY_MASK) {
sizeof (lx_affmask_t)) != 0) {
}
*rval = 0;
} else {
sizeof (lx_affmask_t)) != 0) {
}
*rval = sizeof (lx_affmask_t);
}
return (0);
}
long
{
struct lx_sched_param sched_param;
int rv;
if (pid < 0)
return (rv);
if (policy < 0) {
/*
* get the class id
*/
/*
* get the current policy
*/
else
}
switch (policy) {
case LX_SCHED_FIFO:
case LX_SCHED_RR:
if (prio < 0 ||
break;
case LX_SCHED_OTHER:
break;
default:
}
/*
* finally set scheduling policy and parameters
*/
return (0);
}
long
{
int policy;
int rv;
if (pid < 0)
return (rv);
/*
* get the class id
*/
/*
* get the class info and identify the equivalent linux policy
*/
else
return (policy);
}
long
{
struct lx_sched_param sched_param;
int policy;
int rv;
if (pid < 0)
return (rv);
/*
* get the class id
*/
/*
* get the current policy
*/
else
switch (policy) {
case LX_SCHED_FIFO:
case LX_SCHED_RR:
if (prio < 0 ||
break;
case LX_SCHED_OTHER:
break;
default:
}
/*
* finally set scheduling policy and parameters
*/
return (0);
}
long
{
struct lx_sched_param local_param;
int rv;
if (pid < 0)
return (rv);
/*
* get the class id
*/
/*
* get the class info and identify the equivalent linux policy
*/
/*
* I don't know if we need to do this, coz it can't be
* changed from zero anyway.....
*/
if (scale == 0)
local_param.lx_sched_prio = 0;
else
else
if (rv == 0)
return (rv);
}
long
{
int rv;
if (pid < 0)
return (rv);
/*
* get the class id
*/
/*
* get the class info and identify the equivalent linux policy
*/
return (0);
}
}
int
{
/*
* define the target lwp
*/
if (pid == 0) {
rid = 0;
} else {
rid = 0;
}
return (0);
}
long
{
UIO_SYSSPACE));
}