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 07/17/2013 07:06 PM, KOSAKI Motohiro wrote:
>> And, this is match w/ /sys/devices/system/cpu/present.
> 
> btw, Needless to say, sysconf (_SC_NPROCESSORS_CONF) should read
> /sys/devices/system/cpu/present if it exist because directory reading
> is not atomic operation and might lead to scary result.

glibc counts the individual cpuX entries.

It would be an enhancement to read and parse `present' ;-)

Cheers,
Carlos.


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