MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpuset

Class cpuset

tools/compat/include/sys/cpuset.h:113–123  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

111 * to deal with inconsistent results.
112 */
113struct 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. */

Callers 1

setclasscpumaskFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected