1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate /* 27*7c478bd9Sstevel@tonic-gate * Copyright (c) 2001 by Sun Microsystems, Inc. 28*7c478bd9Sstevel@tonic-gate * All rights reserved. 29*7c478bd9Sstevel@tonic-gate */ 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #ifndef _SYS_IAPRIOCNTL_H 32*7c478bd9Sstevel@tonic-gate #define _SYS_IAPRIOCNTL_H 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 37*7c478bd9Sstevel@tonic-gate #include <sys/thread.h> 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 40*7c478bd9Sstevel@tonic-gate extern "C" { 41*7c478bd9Sstevel@tonic-gate #endif 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate /* 44*7c478bd9Sstevel@tonic-gate * Interactive class specific structures for the priocntl system call. 45*7c478bd9Sstevel@tonic-gate */ 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate /* 48*7c478bd9Sstevel@tonic-gate * Beginning of iaparms structure must match tsparms structure so they 49*7c478bd9Sstevel@tonic-gate * can be used interchangeably. 50*7c478bd9Sstevel@tonic-gate */ 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate typedef struct iaparms { 53*7c478bd9Sstevel@tonic-gate pri_t ia_uprilim; /* user priority limit */ 54*7c478bd9Sstevel@tonic-gate pri_t ia_upri; /* user priority */ 55*7c478bd9Sstevel@tonic-gate int ia_mode; /* interactive on/off */ 56*7c478bd9Sstevel@tonic-gate int ia_nice; /* present nice value */ 57*7c478bd9Sstevel@tonic-gate } iaparms_t; 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate typedef struct iaclass { 60*7c478bd9Sstevel@tonic-gate id_t pc_cid; 61*7c478bd9Sstevel@tonic-gate int pc_clparms[PC_CLPARMSZ]; 62*7c478bd9Sstevel@tonic-gate } iaclass_t; 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate typedef struct iainfo { 65*7c478bd9Sstevel@tonic-gate pri_t ia_maxupri; /* configured limits of user priority range */ 66*7c478bd9Sstevel@tonic-gate } iainfo_t; 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate #define IA_NOCHANGE -32768 69*7c478bd9Sstevel@tonic-gate #define IAMAXUPRI 60 70*7c478bd9Sstevel@tonic-gate #define IAOFFUPRI 29 71*7c478bd9Sstevel@tonic-gate #define IANPROCS 60 72*7c478bd9Sstevel@tonic-gate #define IA_INTERACTIVE_OFF 0x00 /* thread is not interactive */ 73*7c478bd9Sstevel@tonic-gate #define IA_SET_INTERACTIVE 0x01 /* thread is interactive */ 74*7c478bd9Sstevel@tonic-gate #define IA_NICED 0x02 /* thread has been niced */ 75*7c478bd9Sstevel@tonic-gate #define IA_BOOST 10 /* value for boost */ 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gate /* 78*7c478bd9Sstevel@tonic-gate * Interactive class specific keys for the priocntl system call 79*7c478bd9Sstevel@tonic-gate * varargs interface. 80*7c478bd9Sstevel@tonic-gate */ 81*7c478bd9Sstevel@tonic-gate #define IA_KY_UPRILIM 1 /* user priority limit */ 82*7c478bd9Sstevel@tonic-gate #define IA_KY_UPRI 2 /* user priority */ 83*7c478bd9Sstevel@tonic-gate #define IA_KY_MODE 3 /* interactive on/off */ 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate /* 86*7c478bd9Sstevel@tonic-gate * The following is used by the dispadmin(1M) command for 87*7c478bd9Sstevel@tonic-gate * scheduler administration and is not for general use. 88*7c478bd9Sstevel@tonic-gate */ 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32 91*7c478bd9Sstevel@tonic-gate /* Data structure for ILP32 clients */ 92*7c478bd9Sstevel@tonic-gate typedef struct iaadmin32 { 93*7c478bd9Sstevel@tonic-gate caddr32_t ia_dpents; 94*7c478bd9Sstevel@tonic-gate int16_t ia_ndpents; 95*7c478bd9Sstevel@tonic-gate int16_t ia_cmd; 96*7c478bd9Sstevel@tonic-gate } iaadmin32_t; 97*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 98*7c478bd9Sstevel@tonic-gate 99*7c478bd9Sstevel@tonic-gate typedef struct iaadmin { 100*7c478bd9Sstevel@tonic-gate struct iadpent *ia_dpents; 101*7c478bd9Sstevel@tonic-gate short ia_ndpents; 102*7c478bd9Sstevel@tonic-gate short ia_cmd; 103*7c478bd9Sstevel@tonic-gate } iaadmin_t; 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate #define IA_GETDPSIZE 1 106*7c478bd9Sstevel@tonic-gate #define IA_GETDPTBL 2 107*7c478bd9Sstevel@tonic-gate #define IA_SETDPTBL 3 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 110*7c478bd9Sstevel@tonic-gate } 111*7c478bd9Sstevel@tonic-gate #endif 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gate #endif /* _SYS_IAPRIOCNTL_H */ 114