Date: Sat, 16 Nov 2002 19:08:05 -0800 From: Alfred Perlstein <alfred@FreeBSD.org> To: Garrett Wollman <wollman@lcs.mit.edu> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/gen sysconf.c Message-ID: <20021117030805.GA6882@elvis.mu.org> In-Reply-To: <200211170202.gAH22oLd099179@khavrinen.lcs.mit.edu> References: <200211160635.gAG6ZKUX094649@repoman.freebsd.org> <200211160706.gAG76Z4S089556@khavrinen.lcs.mit.edu> <20021116095822.GT50692@elvis.mu.org> <200211170202.gAH22oLd099179@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
* Garrett Wollman <wollman@lcs.mit.edu> [021116 18:02] wrote: > <<On Sat, 16 Nov 2002 01:58:22 -0800, Alfred Perlstein <alfred@FreeBSD.org> said: > > > Should I set _POSIX_AIO_MAX to 1024? > > You *must not* change _POSIX_AIO_MAX. Its value is fixed in the > Standard. (Specifically, it is the minimum permissible value of > {AIO_MAX}.) > > The constant AIO_MAX should probably be left undefined, thereby > forcing applications to call sysconf(_SC_AIO_MAX) if they care -- but > in order for this to work, sysconf() has be able to get the correct > value of {AIO_MAX} from the kernel. > > Rev. 1.18 to sysconf.c is simply wrong. If the kernel is providing an > incorrect value, it's a bug in the kernel and should not be papered > over by the library. If AIO is not supported in the kernel, these > values are meaningless anyway (and an error should probably be > reported). In re 1.18, the problem is that the code changes a 0 return to -1, at least for _SC_AIO_PRIO_DELTA_MAX, so that portion of the revision should stay right? (since 0 is a valid response from the kernel) For _SC_AIO_LISTIO_MAX and _SC_AIO_MAX returning -1 when aio is not loaded is ok, so I can revert that: Index: gen/sysconf.c =================================================================== RCS file: /home/ncvs/src/lib/libc/gen/sysconf.c,v retrieving revision 1.18 diff -u -r1.18 sysconf.c --- gen/sysconf.c 16 Nov 2002 06:35:20 -0000 1.18 +++ gen/sysconf.c 17 Nov 2002 03:06:27 -0000 @@ -254,12 +254,10 @@ 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; case _SC_AIO_MAX: - defaultresult = _POSIX_AIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_MAX; goto yesno; -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021117030805.GA6882>