Page MenuHomeFreeBSD

[1/2] kern: cpuset: allow cpuset_create() to take an allocated *setp
ClosedPublic

Authored by kevans on Nov 20 2020, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 2:39 PM
Unknown Object (File)
Feb 24 2024, 1:22 AM
Unknown Object (File)
Feb 24 2024, 1:22 AM
Unknown Object (File)
Feb 24 2024, 12:59 AM
Unknown Object (File)
Feb 23 2024, 11:08 AM
Unknown Object (File)
Feb 20 2024, 9:27 AM
Unknown Object (File)
Jan 27 2024, 9:01 AM
Unknown Object (File)
Dec 20 2023, 6:14 AM
Subscribers

Details

Summary

Currently, it must always allocate a new set to be used for passing to _cpuset_create, but it doesn't have to. This is purely kern_cpuset.c internal and it's sparsely used, so just change it to use *setp if it's not-NULL and modify the two consumers to pass in the address of a NULL cpuset.

This paves the way for consumers that want the unr allocation without the possibility of sleeping as long as they've done their due diligence to ensure that the mask will properly apply atop the supplied parent (i.e. avoiding the free_unr() in the last failure path).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable