xref: /illumos-gate/usr/src/uts/common/sys/sysconfig.h (revision 440a8a36)
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
5f48205beScasper  * Common Development and Distribution License (the "License").
6f48205beScasper  * 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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
227c478bd9Sstevel@tonic-gate /*	  All Rights Reserved	*/
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*
26f48205beScasper  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
277c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
28*440a8a36SPatrick Mooney  * Copyright 2016 Joyent, Inc.
297c478bd9Sstevel@tonic-gate  */
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifndef _SYS_SYSCONFIG_H
327c478bd9Sstevel@tonic-gate #define	_SYS_SYSCONFIG_H
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
357c478bd9Sstevel@tonic-gate extern "C" {
367c478bd9Sstevel@tonic-gate #endif
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #ifdef _KERNEL
397c478bd9Sstevel@tonic-gate extern int	mach_sysconfig(int);
407c478bd9Sstevel@tonic-gate #endif	/* KERNEL */
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /*
437c478bd9Sstevel@tonic-gate  * cmd values for _sysconfig system call.
447c478bd9Sstevel@tonic-gate  * WARNING: This is an undocumented system call,
457c478bd9Sstevel@tonic-gate  * therefore future compatibility can not
467c478bd9Sstevel@tonic-gate  * guaranteed.
477c478bd9Sstevel@tonic-gate  */
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate #define	 UNUSED			1
507c478bd9Sstevel@tonic-gate #define	_CONFIG_NGROUPS		2	/* # configured supplemental groups */
517c478bd9Sstevel@tonic-gate #define	_CONFIG_CHILD_MAX	3	/* max # of processes per uid session */
527c478bd9Sstevel@tonic-gate #define	_CONFIG_OPEN_FILES	4	/* max # of open files per process */
537c478bd9Sstevel@tonic-gate #define	_CONFIG_POSIX_VER	5	/* POSIX version */
547c478bd9Sstevel@tonic-gate #define	_CONFIG_PAGESIZE	6	/* system page size */
557c478bd9Sstevel@tonic-gate #define	_CONFIG_CLK_TCK		7	/* ticks per second */
567c478bd9Sstevel@tonic-gate #define	_CONFIG_XOPEN_VER	8
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate /*
597c478bd9Sstevel@tonic-gate  * NOTE: XOPEN VERSION. This is process dependent. The kernel will return
607c478bd9Sstevel@tonic-gate  * the default value, currently 3.
617c478bd9Sstevel@tonic-gate  */
627c478bd9Sstevel@tonic-gate 
637c478bd9Sstevel@tonic-gate #define	_CONFIG_PROF_TCK	10	/* profiling ticks per second */
647c478bd9Sstevel@tonic-gate #define	_CONFIG_NPROC_CONF	11	/* processors configured */
657c478bd9Sstevel@tonic-gate #define	_CONFIG_NPROC_ONLN	12	/* processors online */
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate /* posix dot4 names */
687c478bd9Sstevel@tonic-gate #define	_CONFIG_AIO_LISTIO_MAX	13	/* # of operation in a list I/O call */
697c478bd9Sstevel@tonic-gate #define	_CONFIG_AIO_MAX		14	/* # of outstanding async I/O op. */
707c478bd9Sstevel@tonic-gate #define	_CONFIG_AIO_PRIO_DELTA_MAX	15 /* amount I/O priority decrease */
717c478bd9Sstevel@tonic-gate #define	_CONFIG_DELAYTIMER_MAX	16	/* timer timer expiration overruns */
727c478bd9Sstevel@tonic-gate #define	_CONFIG_MQ_OPEN_MAX	17	/* # message queues open per process */
737c478bd9Sstevel@tonic-gate #define	_CONFIG_MQ_PRIO_MAX	18	/* # of message priorities supported */
747c478bd9Sstevel@tonic-gate #define	_CONFIG_RTSIG_MAX	19	/* # of realtime signal numbers */
757c478bd9Sstevel@tonic-gate #define	_CONFIG_SEM_NSEMS_MAX	20	/* No. of semaphore per process */
767c478bd9Sstevel@tonic-gate #define	_CONFIG_SEM_VALUE_MAX	21	/* max. value a semaphore may have */
777c478bd9Sstevel@tonic-gate #define	_CONFIG_SIGQUEUE_MAX	22	/* # of pending queued signal */
787c478bd9Sstevel@tonic-gate #define	_CONFIG_SIGRT_MIN	23	/* first highest-pri realtime signal */
797c478bd9Sstevel@tonic-gate #define	_CONFIG_SIGRT_MAX	24	/* last realtime signal */
807c478bd9Sstevel@tonic-gate #define	_CONFIG_TIMER_MAX	25	/* # of timers per process */
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate #define	_CONFIG_PHYS_PAGES	26	/* phys mem installed in pages */
837c478bd9Sstevel@tonic-gate #define	_CONFIG_AVPHYS_PAGES	27	/* available phys mem in pages */
847c478bd9Sstevel@tonic-gate #define	_CONFIG_COHERENCY	28	/* # bytes coherency */
857c478bd9Sstevel@tonic-gate #define	_CONFIG_SPLIT_CACHE	29	/* split i and d or not */
867c478bd9Sstevel@tonic-gate #define	_CONFIG_ICACHESZ	30	/* icache size in bytes */
877c478bd9Sstevel@tonic-gate #define	_CONFIG_DCACHESZ	31	/* dcache size in bytes */
887c478bd9Sstevel@tonic-gate #define	_CONFIG_ICACHELINESZ	32	/* linesize bytes */
897c478bd9Sstevel@tonic-gate #define	_CONFIG_DCACHELINESZ	33	/* linesize bytes */
907c478bd9Sstevel@tonic-gate #define	_CONFIG_ICACHEBLKSZ	34	/* block size bytes */
917c478bd9Sstevel@tonic-gate #define	_CONFIG_DCACHEBLKSZ	35	/* block size bytes */
927c478bd9Sstevel@tonic-gate #define	_CONFIG_DCACHETBLKSZ	36	/* block size bytes when touched */
937c478bd9Sstevel@tonic-gate #define	_CONFIG_ICACHE_ASSOC	37	/* associativity 1, 2, 3 whatever */
947c478bd9Sstevel@tonic-gate #define	_CONFIG_DCACHE_ASSOC	38	/* associativity 1, 2, 3 whatever */
957c478bd9Sstevel@tonic-gate #define	_CONFIG_MAXPID		42	/* highest PID available */
967c478bd9Sstevel@tonic-gate #define	_CONFIG_STACK_PROT	43	/* default stack protection */
977c478bd9Sstevel@tonic-gate #define	_CONFIG_NPROC_MAX	44	/* maximum # of processors possible */
987c478bd9Sstevel@tonic-gate #define	_CONFIG_CPUID_MAX	45	/* maximum CPU id */
997c478bd9Sstevel@tonic-gate 
1007c478bd9Sstevel@tonic-gate /* UNIX 03 names */
1017c478bd9Sstevel@tonic-gate #define	_CONFIG_SYMLOOP_MAX	46	/* maximum # of symlinks in pathname */
1027c478bd9Sstevel@tonic-gate 
103f48205beScasper #define	_CONFIG_EPHID_MAX	47	/* maximum ephemeral uid */
1044c46c814SRobert Mustacchi #define	_CONFIG_UADDR_MAX	48	/* maximum user address */
105f48205beScasper 
106*440a8a36SPatrick Mooney #define	_CONFIG_NPROC_NCPU	49	/* NCPU (sometimes > NPROC_MAX) */
107*440a8a36SPatrick Mooney 
1087c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1097c478bd9Sstevel@tonic-gate }
1107c478bd9Sstevel@tonic-gate #endif
1117c478bd9Sstevel@tonic-gate 
1127c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSCONFIG_H */
113