diff options
author | alfred <alfred@FreeBSD.org> | 2002-11-17 04:15:34 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-11-17 04:15:34 +0000 |
commit | 404161b0ebc663732ff605fa1cec5fc6f2cbf76d (patch) | |
tree | e2dfa1f642b4d621b045178bb552f0214e31be7a /lib | |
parent | 788d21c22efba82ded14c4c83035501ce6be4936 (diff) | |
download | FreeBSD-src-404161b0ebc663732ff605fa1cec5fc6f2cbf76d.zip FreeBSD-src-404161b0ebc663732ff605fa1cec5fc6f2cbf76d.tar.gz |
Rework the sysconf(3) interaction with aio:
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().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/sysconf.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index aa906f6..ecb833e 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -254,20 +254,17 @@ do_NAME_MAX: return (_POSIX_TIMERS); #endif case _SC_AIO_LISTIO_MAX: - defaultresult = _POSIX_AIO_LISTIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_LISTIO_MAX; - goto yesno; + goto break; case _SC_AIO_MAX: - defaultresult = _POSIX_AIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_MAX; - goto yesno; + goto break; case _SC_AIO_PRIO_DELTA_MAX: - defaultresult = 0; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_PRIO_DELTA_MAX; - goto yesno; + goto break; case _SC_DELAYTIMER_MAX: mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_DELAYTIMER_MAX; |