This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sysconf & AIO_LISTIO_MAX


   From: Andreas Jaeger <aj@suse.de>
   Date: 22 Sep 2000 11:12:58 +0200

   >>>>> Andreas Schwab writes:

    > Neale.Ferguson@SoftwareAG-USA.com writes:
    > |> On Linux, how do I interpret getting a -1 value from
    > |> sysconf(_SC_AIO_LISTIO_MAX) with a ERRNO of 0 (i.e. successful)? Does that
    > |> mean Linux has no limit?

    > It means that it is not supported.  From SUS2
    > (http://www.unix-systems.org/onlinepubs/007908799/xsh/sysconf.html):

    >  RETURN VALUE

    >      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.

Looks like SUS2 is wrong here.  The current POSIX draft has:

  If name is an invalid value, sysconf() shall return -1 and set errno
  to indicate the error.  If the variable corresponding to name has no
  limit, sysconf() shall return -1 without changing the value of errno.
  Note that indefinite limits do not imply infinite limits.

   Is the glibc manual correct here?  It confuses me:

Yep it is correct, at least if you consider not imposing a limit
equivalent with an indefinite limit.

Anyway, If asynchronous I/O is supported (which we claim for Linux),
the AIO_LISTIO_MAX should be at least 2, and if sysconf
(_SC_AIO_LISTIO_MAX) returns -1, this means that the exact limit is
unknown but at least 2.  Looking at the actual implementation in
glibc, it seems that it is only limited by the amount of available
memory.

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]