* cpusets encapsulate cpu binding information for one or more threads. * * a - Accessed with atomics. * s - Set at creation, never modified. Only a ref required to read. * c - Locked internally by a cpuset lock. * * The bitmask is only modified while holding the cpuset lock. It may be * read while only a reference is held but the consumer must be prepared * to deal with inconsistent res
| 111 | * to deal with inconsistent results. |
| 112 | */ |
| 113 | struct cpuset { |
| 114 | volatile u_int cs_ref; /* (a) Reference count. */ |
| 115 | int cs_flags; /* (s) Flags from below. */ |
| 116 | LIST_ENTRY(cpuset) cs_link; /* (c) All identified sets. */ |
| 117 | LIST_ENTRY(cpuset) cs_siblings; /* (c) Sibling set link. */ |
| 118 | struct setlist cs_children; /* (c) List of children. */ |
| 119 | struct domainset *cs_domain; /* (c) NUMA policy. */ |
| 120 | cpusetid_t cs_id; /* (s) Id or INVALID. */ |
| 121 | struct cpuset *cs_parent; /* (s) Pointer to our parent. */ |
| 122 | cpuset_t cs_mask; /* bitmask of valid cpus. */ |
| 123 | }; |
| 124 | |
| 125 | #define CPU_SET_ROOT 0x0001 /* Set is a root set. */ |
| 126 | #define CPU_SET_RDONLY 0x0002 /* No modification allowed. */ |