From af207fa9f6ac891b9a61f36bd8382eb89358aeca Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 11 Jul 2017 11:54:30 +0200 Subject: Add interrupt vector set/get affinity Close #3071. --- cpukit/score/include/rtems/score/processormask.h | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'cpukit/score/include/rtems/score/processormask.h') 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, -- cgit v1.2.3