xref: /illumos-gate/usr/src/uts/common/sys/rtpriocntl.h (revision bbf21555)
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
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
227c478bd9Sstevel@tonic-gate /*
237c478bd9Sstevel@tonic-gate  * Copyright (c) 1997-2001 by Sun Microsystems, Inc.
247c478bd9Sstevel@tonic-gate  * All rights reserved.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28b4203d75SMarcel Telka /*	  All Rights Reserved	*/
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifndef _SYS_RTPRIOCNTL_H
327c478bd9Sstevel@tonic-gate #define	_SYS_RTPRIOCNTL_H
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #include <sys/types.h>
357c478bd9Sstevel@tonic-gate #include <sys/thread.h>
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
387c478bd9Sstevel@tonic-gate extern "C" {
397c478bd9Sstevel@tonic-gate #endif
407c478bd9Sstevel@tonic-gate 
417c478bd9Sstevel@tonic-gate /*
427c478bd9Sstevel@tonic-gate  * Real-time class specific structures for the priocntl system call.
437c478bd9Sstevel@tonic-gate  */
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate typedef struct rtparms {
467c478bd9Sstevel@tonic-gate 	pri_t	rt_pri;		/* real-time priority */
477c478bd9Sstevel@tonic-gate 	uint_t	rt_tqsecs;	/* seconds in time quantum */
487c478bd9Sstevel@tonic-gate 	int	rt_tqnsecs;	/* additional nanosecs in time quant */
497c478bd9Sstevel@tonic-gate } rtparms_t;
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate typedef struct rtinfo {
537c478bd9Sstevel@tonic-gate 	pri_t	rt_maxpri;	/* maximum configured real-time priority */
547c478bd9Sstevel@tonic-gate } rtinfo_t;
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate 
577c478bd9Sstevel@tonic-gate #define	RT_NOCHANGE	-1
587c478bd9Sstevel@tonic-gate #define	RT_TQINF	-2
597c478bd9Sstevel@tonic-gate #define	RT_TQDEF	-3
607c478bd9Sstevel@tonic-gate 
617c478bd9Sstevel@tonic-gate /*
627c478bd9Sstevel@tonic-gate  * Real-time class specific keys for the priocntl system call varargs interface.
637c478bd9Sstevel@tonic-gate  */
647c478bd9Sstevel@tonic-gate #define	RT_KY_PRI	1	/* real-time priority */
657c478bd9Sstevel@tonic-gate #define	RT_KY_TQSECS	2	/* seconds in time quantum */
667c478bd9Sstevel@tonic-gate #define	RT_KY_TQNSECS	3	/* nanoseconds in time quantum */
677c478bd9Sstevel@tonic-gate #define	RT_KY_TQSIG	4	/* real-time time quantum signal */
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate /*
70*bbf21555SRichard Lowe  * The following is used by the dispadmin(8) command for
717c478bd9Sstevel@tonic-gate  * scheduler administration and is not for general use.
727c478bd9Sstevel@tonic-gate  */
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32
757c478bd9Sstevel@tonic-gate /* Data structure for ILP32 clients */
767c478bd9Sstevel@tonic-gate typedef struct rtadmin32 {
777c478bd9Sstevel@tonic-gate 	caddr32_t	rt_dpents;
787c478bd9Sstevel@tonic-gate 	int16_t		rt_ndpents;
797c478bd9Sstevel@tonic-gate 	int16_t		rt_cmd;
807c478bd9Sstevel@tonic-gate } rtadmin32_t;
817c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate typedef struct rtadmin {
847c478bd9Sstevel@tonic-gate 	struct rtdpent	*rt_dpents;
857c478bd9Sstevel@tonic-gate 	short		rt_ndpents;
867c478bd9Sstevel@tonic-gate 	short		rt_cmd;
877c478bd9Sstevel@tonic-gate } rtadmin_t;
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate #define	RT_GETDPSIZE	1
907c478bd9Sstevel@tonic-gate #define	RT_GETDPTBL	2
917c478bd9Sstevel@tonic-gate #define	RT_SETDPTBL	3
927c478bd9Sstevel@tonic-gate 
937c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
947c478bd9Sstevel@tonic-gate }
957c478bd9Sstevel@tonic-gate #endif
967c478bd9Sstevel@tonic-gate 
977c478bd9Sstevel@tonic-gate #endif	/* _SYS_RTPRIOCNTL_H */
98