Upon successful completion, sysconf() returns the current variable value on the system. The value returned will not be more restrictive than the corresponding value described to the application when it was compiled with the implementation's <limits.h>, <unistd.h> or <time.h>. The value will not change during the lifetime of the calling process.
If name is an invalid value, sysconf() returns -1 and sets errno to indicate the error. If the variable corresponding to name is associated with functionality that is not supported
by the system, sysconf() returns -1 without changing the value of errno.
Calling sysconf() with the following returns -1 without setting errno, because no maximum limit can be determined. The system supports at least the minimum values and can support higher values depending upon system resources.
|
Variable Minimum supported value
_SC_AIO_MAX _POSIX_AIO_MAX
_SC_ATEXIT_MAX 32
_SC_THREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX
_SC_THREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
_SC_THREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
|
The following SPARC and IA platform variables return EINVAL:
|
_SC_COHER_BLKSZ _SC_DCACHE_ASSOC
_SC_DCACHE_BLKSZ _SC_DCACHE_LINESZ
_SC_DCACHE_SZ _SC_DCACHE_TBLKSZ
_SC_ICACHE_ASSOC _SC_ICACHE_BLKSZ
_SC_ICACHE_LINESZ _SC_ICACHE_SZ
_SC_SPLIT_CACHE
|
|