10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 56298Sakolb * Common Development and Distribution License (the "License"). 66298Sakolb * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*10089SSurya.Prakki@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_PSET_H 270Sstevel@tonic-gate #define _SYS_PSET_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #ifdef __cplusplus 300Sstevel@tonic-gate extern "C" { 310Sstevel@tonic-gate #endif 320Sstevel@tonic-gate 330Sstevel@tonic-gate #if !defined(_ASM) 340Sstevel@tonic-gate 350Sstevel@tonic-gate #include <sys/types.h> 360Sstevel@tonic-gate #include <sys/processor.h> 370Sstevel@tonic-gate #include <sys/procset.h> 380Sstevel@tonic-gate 390Sstevel@tonic-gate typedef int psetid_t; 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* special processor set id's */ 420Sstevel@tonic-gate #define PS_NONE -1 430Sstevel@tonic-gate #define PS_QUERY -2 440Sstevel@tonic-gate #define PS_MYID -3 456298Sakolb #define PS_SOFT -4 466298Sakolb #define PS_HARD -5 476298Sakolb #define PS_QUERY_TYPE -6 480Sstevel@tonic-gate 490Sstevel@tonic-gate /* types of processor sets */ 500Sstevel@tonic-gate #define PS_SYSTEM 1 510Sstevel@tonic-gate #define PS_PRIVATE 2 520Sstevel@tonic-gate 530Sstevel@tonic-gate #ifndef _KERNEL 540Sstevel@tonic-gate #ifdef __STDC__ 550Sstevel@tonic-gate 560Sstevel@tonic-gate extern int pset_create(psetid_t *); 570Sstevel@tonic-gate extern int pset_destroy(psetid_t); 580Sstevel@tonic-gate extern int pset_assign(psetid_t, processorid_t, psetid_t *); 590Sstevel@tonic-gate extern int pset_info(psetid_t, int *, uint_t *, processorid_t *); 600Sstevel@tonic-gate extern int pset_bind(psetid_t, idtype_t, id_t, psetid_t *); 61*10089SSurya.Prakki@Sun.COM extern int pset_bind_lwp(psetid_t, id_t, pid_t, psetid_t *); 620Sstevel@tonic-gate extern int pset_getloadavg(psetid_t, double [], int); 630Sstevel@tonic-gate extern int pset_list(psetid_t *, uint_t *); 640Sstevel@tonic-gate extern int pset_setattr(psetid_t, uint_t); 650Sstevel@tonic-gate extern int pset_getattr(psetid_t, uint_t *); 660Sstevel@tonic-gate 670Sstevel@tonic-gate #else 680Sstevel@tonic-gate 690Sstevel@tonic-gate extern int pset_create(); 700Sstevel@tonic-gate extern int pset_destroy(); 710Sstevel@tonic-gate extern int pset_assign(); 720Sstevel@tonic-gate extern int pset_info(); 730Sstevel@tonic-gate extern int pset_bind(); 74*10089SSurya.Prakki@Sun.COM extern int pset_bind_lwp(); 750Sstevel@tonic-gate extern int pset_getloadavg(); 760Sstevel@tonic-gate extern int pset_list(); 770Sstevel@tonic-gate extern int pset_setattr(); 780Sstevel@tonic-gate extern int pset_getattr(); 790Sstevel@tonic-gate 800Sstevel@tonic-gate #endif /* __STDC__ */ 810Sstevel@tonic-gate #endif /* ! _KERNEL */ 820Sstevel@tonic-gate 830Sstevel@tonic-gate #endif /* !defined(_ASM) */ 840Sstevel@tonic-gate 850Sstevel@tonic-gate /* system call subcodes */ 860Sstevel@tonic-gate #define PSET_CREATE 0 870Sstevel@tonic-gate #define PSET_DESTROY 1 880Sstevel@tonic-gate #define PSET_ASSIGN 2 890Sstevel@tonic-gate #define PSET_INFO 3 900Sstevel@tonic-gate #define PSET_BIND 4 910Sstevel@tonic-gate #define PSET_GETLOADAVG 5 920Sstevel@tonic-gate #define PSET_LIST 6 930Sstevel@tonic-gate #define PSET_SETATTR 7 940Sstevel@tonic-gate #define PSET_GETATTR 8 950Sstevel@tonic-gate #define PSET_ASSIGN_FORCED 9 96*10089SSurya.Prakki@Sun.COM #define PSET_BIND_LWP 10 970Sstevel@tonic-gate 980Sstevel@tonic-gate /* attribute bits */ 990Sstevel@tonic-gate #define PSET_NOESCAPE 0x0001 1000Sstevel@tonic-gate 1010Sstevel@tonic-gate #ifdef __cplusplus 1020Sstevel@tonic-gate } 1030Sstevel@tonic-gate #endif 1040Sstevel@tonic-gate 1050Sstevel@tonic-gate #endif /* _SYS_PSET_H */ 106