NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/58679: sched_getaffinity_np() always returns an empty set



In that case, please consider this to be a documentation bug as the NetBSD implementation differs from sched_getaffinity (Linux) and cpuset_getaffinity (FreeBSD). And it is reasonable to expect the similarity between those.

As a side note, it doesn’t make it any easier to implement the code that pulls the number CPUs available as one must call both sched_getaffinity_np() and if that fails fallback to sysconf(). At least I expect the process does inherit the affinity from the parent, right?

Thank you,
Ondrej
--
Ondřej Surý (He/Him)

> On 19. 9. 2024, at 14:55, Martin Husemann via gnats <gnats-admin%netbsd.org@localhost> wrote:
> 
> The default affinity of a process in NetBSD is the empty set (that is:
> no specific affinity is defined).
> 
> I don't think this should be considered a bug.
> 
> If you set some affinity, the sched_getaffinity* calls will return the mask
> you set.



Home | Main Index | Thread Index | Old Index