NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES
$(OS_DIR)/lib/libc.a #include <posix/unistd.h>long sysconf(int name);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The sysconf() function provides a method for the application to determine the current value of a configurable system limit or option (variable).
The name argument represents the system variable to be queried. The symbolic constants used for name are defined in <posix/unistd.h> and appear in the right-hand column of the following table.
Some of the variables in the left-hand column of the table are independent of the system configuration and are also defined in <limits.h> or <posix/unistd.h> if the _POSIX_MRTP_SOURCE feature test macro is defined before these headers are included.
Variable | Name Value |
---|---|
ARG_MAX | _SC_ARG_MAX |
DELAYTIMER_MAX | _SC_DELAYTIMER_MAX |
_MQ_OPEN_MAX | _SC_MQ_OPEN_MAX |
_MQ_PRIO_MAX | _SC_MQ_PRIO_MAX |
_MQ_DFL_MSGSIZE | _SC_MQ_DFL_MSGSIZE |
_MQ_DFL_MAXMSGNB | _SC_MQ_DFL_MAXMSGNB |
_MQ_PATHMAX | _SC_MQ_PATHMAX |
NGROUPS_MAX | _SC_NGROUPS_MAX |
OPEN_MAX | _SC_OPEN_MAX |
PAGESIZE | _SC_PAGESIZE |
PTHREAD_DESTRUCTOR_ITERATIONS | _SC_PTHREAD_DESTRUCTOR_ITERATIONS |
PTHREAD_KEYS_MAX | _SC_PTHREAD_KEYS_MAX |
PTHREAD_STACK_MIN | _SC_PTHREAD_STACK_MIN |
PTHREAD_THREADS_MAX | _SC_PTHREAD_THREADS_MAX |
SEM_VALUE_MAX | _SC_SEM_VALUE_MAX |
SHM_PATHMAX | _SC_SHM_PATHMAX |
TIMER_MAX | _SC_TIMER_MAX |
TZNAME_MAX | _SC_TZNAME_MAX |
_POSIX_MESSAGE_PASSING | _SC_MESSAGE_PASSING |
_POSIX_SEMAPHORES | _SC_SEMAPHORES |
_POSIX_SHARED_MEMORY_OBJECTS | _SC_SHARED_MEMORY_OBJECTS |
_POSIX_THREADS | _SC_THREADS |
_POSIX_THREAD_ATTR_STACKADDR | _SC_THREAD_ATTR_STACKADDR |
_POSIX_THREAD_ATTR_STACKSIZE | _SC_THREAD_ATTR_STACKSIZE |
_POSIX_THREAD_PRIORITY_SCHEDULING | _SC_THREAD_PRIORITY_SCHEDULING |
_POSIX_THREAD_PRIO_INHERIT | _SC_THREAD_PRIO_INHERIT |
_POSIX_THREAD_PRIO_PROTECT | _SC_THREAD_PRIO_PROTECT |
_POSIX_THREAD_PROCESS_SHARED | _SC_THREAD_PROCESS_SHARED |
_POSIX_THREAD_SAFE_FUNCTIONS | _SC_THREAD_SAFE_FUNCTIONS |
_POSIX_TIMERS | _SC_TIMERS |
_POSIX_VERSION | _SC_VERSION |
If name is an invalid value, sysconf() returns -1. If the variable corresponding to name is associated with a functionality that is not supported by the system, sysconf() returns -1 without changing the value of errno.
Otherwise, sysconf() returns the current value of the variable on the system. The value returned is no more restrictive than the corresponding value passed to the application when it was compiled with <limits.h> or <posix/unistd.h>. The value does not change during the lifetime of the calling actor.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES