diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-11 11:54:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-12 08:00:13 +0200 |
commit | af207fa9f6ac891b9a61f36bd8382eb89358aeca (patch) | |
tree | 0f6604b9702087b467c48bd747b63f865b43c697 /cpukit/score/include | |
parent | Add interrupt server move (diff) | |
download | rtems-af207fa9f6ac891b9a61f36bd8382eb89358aeca.tar.bz2 |
Add interrupt vector set/get affinity
Close #3071.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/processormask.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/processormask.h b/cpukit/score/include/rtems/score/processormask.h index ed79e63d6f..fd256d2342 100644 --- a/cpukit/score/include/rtems/score/processormask.h +++ b/cpukit/score/include/rtems/score/processormask.h @@ -203,6 +203,31 @@ RTEMS_INLINE_ROUTINE uint32_t _Processor_mask_To_uint32_t( return (uint32_t) (bits >> (32 * (index % _BITSET_BITS) / 32)); } +/** + * @brief Creates a processor set from an unsigned 32-bit integer relative to + * the specified index. + */ +RTEMS_INLINE_ROUTINE void _Processor_mask_From_uint32_t( + Processor_mask *mask, + uint32_t bits, + uint32_t index +) +{ + _Processor_mask_Zero( mask ); + mask->__bits[ __bitset_words( index ) ] = ((long) bits) << (32 * (index % _BITSET_BITS) / 32); +} + +/** + * @brief Creates a processor set from the specified index. + */ +RTEMS_INLINE_ROUTINE void _Processor_mask_From_index( + Processor_mask *mask, + uint32_t index +) +{ + BIT_SETOF( CPU_MAXIMUM_PROCESSORS, (int) index, mask ); +} + typedef enum { PROCESSOR_MASK_COPY_LOSSLESS, PROCESSOR_MASK_COPY_PARTIAL_LOSS, |