summaryrefslogtreecommitdiff
path: root/lib/libc/gen/sysconf.c
Commit message (Collapse)AuthorAgeFilesLines
* goto break; != break;Doug Barton2002-11-171-3/+3
| | | | | | | | | I've no idea if this is the right behavior for the library, but this at least fixes the build, and matches what seems to be alfred's intent in the commit message for 1.19. Notes: svn path=/head/; revision=107000
* Rework the sysconf(3) interaction with aio:Alfred Perlstein2002-11-171-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | sysconf.c: Use 'break' rather than 'goto yesno' in sysconf.c so that we report a '0' return value from the kernel sysctl. vfs_aio.c: Make aio reset its configuration parameters to -1 after unloading instead of 0. posix4_mib.c: Initialize the aio configuration parameters to -1 to indicate that it is not loaded. Add a facility (p31b_iscfg()) to determine if a posix4 facility has been initialized to avoid having to re-order the SYSINITs. Use p31b_iscfg() to determine if aio has had a chance to run yet which is likely if it is compiled into the kernel and avoid spamming its values. Introduce a macro P31B_VALID() instead of doing the same comparison over and over. posix4.h: Prototype p31b_iscfg(). Notes: svn path=/head/; revision=106998
* Provide more correct default values for sysconf(3) reporting of the AIOAlfred Perlstein2002-11-161-0/+3
| | | | | | | | | | | | | | | | subsystems capabilities: _SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX _SC_AIO_MAX returns the default _POSIX_AIO_MAX _SC_AIO_PRIO_DELTA_MAX returns the default of 0 Without these adjustments the values returned are -1 even when the aio side of the kernel returns '0' for them which is incorrect. Noticed by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=106976
* Update limits and configuration parameters for 1003.1/TC1/D6.Garrett Wollman2002-10-271-1/+23
| | | | | | | | | | | | | | Implement new sysconf keys. Change the implenentation of _SC_ASYNCHRONOUS_IO in preparation for the next set of changes. Move some limits which had been in <sys/syslimits.h> to <limits.h> where they belong. They had only ever been in syslimits.h to provide for the kernel implementation of the CTL_USER MIB branch, which went away with newsysctl years ago. (There is a #error in <sys/syslimits.h> which I will downgrade in the next commit.) Notes: svn path=/head/; revision=106055
* Initiate deorbit burn sequence for sysctl CTL_USER MIB branch.Garrett Wollman2002-09-211-105/+351
| | | | | | | | | | | | | | | | Use the correct constants directly from sysconf() rather than calling sysctl() to tell us the (still compiled-in) value. Leave the CTL_POSIX1B stuff alone for now (but I'd like to see this replaced with a single structure returning all of the relevant information). Implement all of the keys from 1003.1-2001 that we can. Ensure that the build will break if someone redefines an option constant to zero without implementing the necessary presence-detection logic here. (4 of 5) Notes: svn path=/head/; revision=103730
* Don't bother asking the kernel about _SC_FSYNC; it's not optional.Garrett Wollman2002-07-151-4/+3
| | | | Notes: svn path=/head/; revision=100142
* A break after a return is useless.Dima Dorfman2002-03-241-1/+0
| | | | Notes: svn path=/head/; revision=93082
* Fix SCM ID's.David E. O'Brien2002-02-011-5/+2
| | | | Notes: svn path=/head/; revision=90039
* Add support for sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN).Joseph Koshy2001-12-011-0/+8
| | | | | | | | | | | This API is supported in SVR4.0MP, Solaris, Linux, AIX and Tru64 Unix. PR: bin/27489 Submitted by: Arun Sharma <arun@sharma-home.net> Reviewed by: bde (prior version) Notes: svn path=/head/; revision=87161
* After one too many PRs on the subject, bite the bullet and define IOV_MAXGarrett Wollman2001-06-181-0/+12
| | | | | | | | | | | and its associated constants. Implement _SC_IOV_MAX in the usual way. Be a bit sloppy about the namespace question; this should get cleared up in time for 5.0. MFC after: 1 month Notes: svn path=/head/; revision=78431
* Add a trivial mechanism for returning a useful default value if one isMike Smith1998-06-011-1/+4
| | | | | | | | | | | | available and the kernel MIB setting is zero. Return the result from getpagesize() if the p1003_1b.pagesize MIB value is zero. Suggested by: Joerg Schilling <schilling@fokus.gmd.de> Notes: svn path=/head/; revision=36577
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B andPeter Dufault1998-03-281-53/+54
| | | | | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing. Notes: svn path=/head/; revision=34925
* Reviewed by: bdePeter Dufault1998-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes to support building with _POSIX_SOURCE set to 199309L: 1. Add sys/_posix.h to handle those preprocessor defs that POSIX says have effects when defined before including any header files; 2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE 3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now defined in POSIX. These show up when: _POSIX_SOURCE and _POSIX_C_SOURCE are not set or _POSIX_C_SOURCE is set >= 199309L and vanish when: _POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L. 4. Explain these in man 9 posix4; 5. Include _posix.h and conditionalize on new feature test. Notes: svn path=/head/; revision=34319
* Reviewed by: msmith, bde long agoPeter Dufault1998-03-041-0/+107
| | | | | | | | POSIX.4 headers and sysctl variables. Nothing should change unless POSIX4 is defined or _POSIX_VERSION is set to 199309. Notes: svn path=/head/; revision=34030
* Include sys/time.h, not sys/user.h.David Greenman1995-12-081-1/+1
| | | | | | | Submitted by: "Marc G. Fournier" <scrappy@hub.org> Notes: svn path=/head/; revision=12674
* Add #include <sys/user.h>.Poul-Henning Kamp1995-10-281-0/+1
| | | | Notes: svn path=/head/; revision=11874
* Minor cleanup, mostly unused vars and missing #includes.Poul-Henning Kamp1995-10-221-1/+0
| | | | Notes: svn path=/head/; revision=11659
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8870
* Include <time.h> instead of <sys/time.h> to get CLK_TCK. IncludingBruce Evans1995-02-031-1/+1
| | | | | | | | <sys/time.h> works because <sys/time.h> includes <time.h> if KERNEL is not defined, but is ugly. Notes: svn path=/head/; revision=6171
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+188
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573