23 #ifndef _RTEMS_SCORE_PROCESSORMASK_H 24 #define _RTEMS_SCORE_PROCESSORMASK_H 26 #include <rtems/score/cpu.h> 28 #include <sys/cpuset.h> 70 Processor_mask *dst,
const Processor_mask *src
93 const Processor_mask *mask,
105 const Processor_mask *a,
106 const Processor_mask *b
117 const Processor_mask *a,
118 const Processor_mask *b
129 const Processor_mask *big,
130 const Processor_mask *small
141 const Processor_mask *b,
142 const Processor_mask *c
153 const Processor_mask *b,
154 const Processor_mask *c
165 const Processor_mask *b,
166 const Processor_mask *c
177 const Processor_mask *b,
178 const Processor_mask *c
199 const Processor_mask *mask,
203 long bits = mask->__bits[ __bitset_words( index ) ];
205 return (uint32_t) (bits >> (32 * (index % _BITSET_BITS) / 32));
213 Processor_mask *mask,
218 _Processor_mask_Zero( mask );
219 mask->__bits[ __bitset_words( index ) ] = ((long) bits) << (32 * (index % _BITSET_BITS) / 32);
226 Processor_mask *mask,
234 PROCESSOR_MASK_COPY_LOSSLESS,
235 PROCESSOR_MASK_COPY_PARTIAL_LOSS,
236 PROCESSOR_MASK_COPY_COMPLETE_LOSS,
237 PROCESSOR_MASK_COPY_INVALID_SIZE
238 } Processor_mask_Copy_status;
241 Processor_mask_Copy_status status
244 return (
unsigned int) status <= PROCESSOR_MASK_COPY_PARTIAL_LOSS;
247 Processor_mask_Copy_status _Processor_mask_Copy(
255 const Processor_mask *src,
260 return _Processor_mask_Copy(
274 return _Processor_mask_Copy(
282 extern const Processor_mask _Processor_mask_The_one_and_only;
typedef BITSET_DEFINE(Processor_mask, CPU_MAXIMUM_PROCESSORS) Processor_mask
A bit map which is large enough to provide one bit for each processor in the system.
#define CPU_MAXIMUM_PROCESSORS
Maximum number of processors of all systems supported by this CPU port.
Definition: cpu.h:250
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
RTEMS_INLINE_ROUTINE void _Processor_mask_Or(Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
Performs a bitwise a = b | c.
Definition: processormask.h:163
RTEMS_INLINE_ROUTINE bool _Processor_mask_Has_overlap(const Processor_mask *a, const Processor_mask *b)
Returns true if the intersection of the processor sets a and b is non-empty, and false otherwise...
Definition: processormask.h:116
RTEMS_INLINE_ROUTINE void _Processor_mask_From_index(Processor_mask *mask, uint32_t index)
Creates a processor set from the specified index.
Definition: processormask.h:225
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_subset(const Processor_mask *big, const Processor_mask *small)
Returns true if the processor set small is a subset of processor set big, and false otherwise...
Definition: processormask.h:128
RTEMS_INLINE_ROUTINE void _Processor_mask_Nand(Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
Performs a bitwise a = b & ~c.
Definition: processormask.h:151
RTEMS_INLINE_ROUTINE void _Processor_mask_Xor(Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
Performs a bitwise a = b ^ c.
Definition: processormask.h:175
RTEMS_INLINE_ROUTINE void _Processor_mask_From_uint32_t(Processor_mask *mask, uint32_t bits, uint32_t index)
Creates a processor set from an unsigned 32-bit integer relative to the specified index...
Definition: processormask.h:212
RTEMS_INLINE_ROUTINE void _Processor_mask_And(Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
Performs a bitwise a = b & c.
Definition: processormask.h:139
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_equal(const Processor_mask *a, const Processor_mask *b)
Returns true if the processor sets a and b are equal, and false otherwise.
Definition: processormask.h:104
RTEMS_INLINE_ROUTINE uint32_t _Processor_mask_To_uint32_t(const Processor_mask *mask, uint32_t index)
Returns the subset of 32 processors containing the specified index as an unsigned 32-bit integer...
Definition: processormask.h:198