This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

Re: What *is* the API for sched_getaffinity? Should sched_getaffinity always succeed when using cpu_set_t?


On Tue, Jul 23, 2013 at 02:09:53PM -0400, Carlos O'Donell wrote:
> Sorry, just to clarify, are you saying that OPEN_MAX needs a similar
> exception or that it already has one?

It already has one.

> I don't see anything in the glibc manual, linux kernel man pages, or 
> POSIX about _SC_OPEN_MAX being non-constant.

It's in the standard specification:

http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html

> I know that sysconf values are expected to be constant for the lifetime
> of the process, but this is just not true for _SC_NPROCESSORS_ONLN.
> 
> Currently in glibc we do not guarantee that _SC_NPROCESSORS_ONLN is
> constant.
> 
> It would be a shame to throw away sysconf and write an almost identical
> API to handle non-constant values.
> 
> I would rather say:
> 
> (a) These value are constant as required by POSIX: <list of them>
> 
> (b) These values are not-constant: <list of them>

Right.

Siddhesh


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