RTEMS  5.1
Enumerations | Functions | Variables
processormask.h File Reference

Processor Mask API. More...

#include <rtems/score/cpu.h>
#include <sys/cpuset.h>
#include <strings.h>

Go to the source code of this file.

Enumerations

enum  Processor_mask_Copy_status { PROCESSOR_MASK_COPY_LOSSLESS, PROCESSOR_MASK_COPY_PARTIAL_LOSS, PROCESSOR_MASK_COPY_COMPLETE_LOSS, PROCESSOR_MASK_COPY_INVALID_SIZE }
 

Functions

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.
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Zero (Processor_mask *mask)
 Sets the bits of the mask to zero, also considers CPU_MAXIMUM_PROCESSORS. More...
 
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_zero (const Processor_mask *mask)
 Checks if the mask is zero, also considers CPU_MAXIMUM_PROCESSORS. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Fill (Processor_mask *mask)
 Fills the mask, also considers CPU_MAXIMUM_PROCESSORS. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Assign (Processor_mask *dst, const Processor_mask *src)
 Copies the mask to another mask, also considers CPU_MAXIMUM_PROCESSORS. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Set (Processor_mask *mask, uint32_t index)
 Sets the specified index bit of the mask. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Clear (Processor_mask *mask, uint32_t index)
 Clears the specified index bit of the mask. More...
 
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_set (const Processor_mask *mask, uint32_t index)
 Checks if the specified index bit of the mask is set. More...
 
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_equal (const Processor_mask *a, const Processor_mask *b)
 Checks if the processor sets a and b are equal. More...
 
RTEMS_INLINE_ROUTINE bool _Processor_mask_Has_overlap (const Processor_mask *a, const Processor_mask *b)
 Checks if the intersection of the processor sets a and b is non-empty. More...
 
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_subset (const Processor_mask *big, const Processor_mask *small)
 Checks if the processor set small is a subset of processor set big. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_And (Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
 Performs a bitwise a = b & c. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Nand (Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
 Performs a bitwise a = b & ~c. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Or (Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
 Performs a bitwise a = b | c. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_Xor (Processor_mask *a, const Processor_mask *b, const Processor_mask *c)
 Performs a bitwise a = b ^ c. More...
 
RTEMS_INLINE_ROUTINE uint32_t _Processor_mask_Count (const Processor_mask *a)
 Gets the number of set bits in the processor mask. More...
 
RTEMS_INLINE_ROUTINE uint32_t _Processor_mask_Find_last_set (const Processor_mask *a)
 Finds the last set of the processor mask. More...
 
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. More...
 
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. More...
 
RTEMS_INLINE_ROUTINE void _Processor_mask_From_index (Processor_mask *mask, uint32_t index)
 Creates a processor set from the specified index. More...
 
RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_at_most_partial_loss (Processor_mask_Copy_status status)
 Checks if the copy status guarantees at most partial loss. More...
 
Processor_mask_Copy_status _Processor_mask_Copy (long *dst, size_t dst_size, const long *src, size_t src_size)
 Copies one mask to another. More...
 
RTEMS_INLINE_ROUTINE Processor_mask_Copy_status _Processor_mask_To_cpu_set_t (const Processor_mask *src, size_t dst_size, cpu_set_t *dst)
 Copies one mask to another. More...
 
RTEMS_INLINE_ROUTINE Processor_mask_Copy_status _Processor_mask_From_cpu_set_t (Processor_mask *dst, size_t src_size, const cpu_set_t *src)
 Copies one mask to another. More...
 

Variables

const Processor_mask _Processor_mask_The_one_and_only
 

Detailed Description

Processor Mask API.