xref: /titanic_44/usr/src/uts/common/sys/pset.h (revision fb9b0aa8c76ff829a7069d38161a2cecc656b091)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
50b70c467Sakolb  * Common Development and Distribution License (the "License").
60b70c467Sakolb  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*fb9b0aa8SSurya Prakki  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_SYS_PSET_H
277c478bd9Sstevel@tonic-gate #define	_SYS_PSET_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
307c478bd9Sstevel@tonic-gate extern "C" {
317c478bd9Sstevel@tonic-gate #endif
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #if !defined(_ASM)
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #include <sys/types.h>
367c478bd9Sstevel@tonic-gate #include <sys/processor.h>
377c478bd9Sstevel@tonic-gate #include <sys/procset.h>
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate typedef int psetid_t;
407c478bd9Sstevel@tonic-gate 
417c478bd9Sstevel@tonic-gate /* special processor set id's */
427c478bd9Sstevel@tonic-gate #define	PS_NONE		-1
437c478bd9Sstevel@tonic-gate #define	PS_QUERY	-2
447c478bd9Sstevel@tonic-gate #define	PS_MYID		-3
450b70c467Sakolb #define	PS_SOFT		-4
460b70c467Sakolb #define	PS_HARD		-5
470b70c467Sakolb #define	PS_QUERY_TYPE	-6
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate /* types of processor sets */
507c478bd9Sstevel@tonic-gate #define	PS_SYSTEM	1
517c478bd9Sstevel@tonic-gate #define	PS_PRIVATE	2
527c478bd9Sstevel@tonic-gate 
537c478bd9Sstevel@tonic-gate #ifndef	_KERNEL
547c478bd9Sstevel@tonic-gate #ifdef	__STDC__
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate extern int	pset_create(psetid_t *);
577c478bd9Sstevel@tonic-gate extern int	pset_destroy(psetid_t);
587c478bd9Sstevel@tonic-gate extern int	pset_assign(psetid_t, processorid_t, psetid_t *);
597c478bd9Sstevel@tonic-gate extern int	pset_info(psetid_t, int *, uint_t *, processorid_t *);
607c478bd9Sstevel@tonic-gate extern int	pset_bind(psetid_t, idtype_t, id_t, psetid_t *);
61*fb9b0aa8SSurya Prakki extern int	pset_bind_lwp(psetid_t, id_t, pid_t, psetid_t *);
627c478bd9Sstevel@tonic-gate extern int	pset_getloadavg(psetid_t, double [], int);
637c478bd9Sstevel@tonic-gate extern int	pset_list(psetid_t *, uint_t *);
647c478bd9Sstevel@tonic-gate extern int	pset_setattr(psetid_t, uint_t);
657c478bd9Sstevel@tonic-gate extern int	pset_getattr(psetid_t, uint_t *);
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate #else
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate extern int	pset_create();
707c478bd9Sstevel@tonic-gate extern int	pset_destroy();
717c478bd9Sstevel@tonic-gate extern int	pset_assign();
727c478bd9Sstevel@tonic-gate extern int	pset_info();
737c478bd9Sstevel@tonic-gate extern int	pset_bind();
74*fb9b0aa8SSurya Prakki extern int	pset_bind_lwp();
757c478bd9Sstevel@tonic-gate extern int	pset_getloadavg();
767c478bd9Sstevel@tonic-gate extern int	pset_list();
777c478bd9Sstevel@tonic-gate extern int	pset_setattr();
787c478bd9Sstevel@tonic-gate extern int	pset_getattr();
797c478bd9Sstevel@tonic-gate 
807c478bd9Sstevel@tonic-gate #endif	/* __STDC__ */
817c478bd9Sstevel@tonic-gate #endif	/* ! _KERNEL */
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate #endif	/* !defined(_ASM) */
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate /* system call subcodes */
867c478bd9Sstevel@tonic-gate #define	PSET_CREATE		0
877c478bd9Sstevel@tonic-gate #define	PSET_DESTROY		1
887c478bd9Sstevel@tonic-gate #define	PSET_ASSIGN		2
897c478bd9Sstevel@tonic-gate #define	PSET_INFO		3
907c478bd9Sstevel@tonic-gate #define	PSET_BIND		4
917c478bd9Sstevel@tonic-gate #define	PSET_GETLOADAVG		5
927c478bd9Sstevel@tonic-gate #define	PSET_LIST		6
937c478bd9Sstevel@tonic-gate #define	PSET_SETATTR		7
947c478bd9Sstevel@tonic-gate #define	PSET_GETATTR		8
957c478bd9Sstevel@tonic-gate #define	PSET_ASSIGN_FORCED	9
96*fb9b0aa8SSurya Prakki #define	PSET_BIND_LWP		10
977c478bd9Sstevel@tonic-gate 
987c478bd9Sstevel@tonic-gate /* attribute bits */
997c478bd9Sstevel@tonic-gate #define	PSET_NOESCAPE	0x0001
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1027c478bd9Sstevel@tonic-gate }
1037c478bd9Sstevel@tonic-gate #endif
1047c478bd9Sstevel@tonic-gate 
1057c478bd9Sstevel@tonic-gate #endif	/* _SYS_PSET_H */
106