diff --git a/cpukit/include/rtems/score/processormaskimpl.h b/cpukit/include/rtems/score/processormaskimpl.h index 8fa6cc8d19..ae8adbbb44 100644 --- a/cpukit/include/rtems/score/processormaskimpl.h +++ b/cpukit/include/rtems/score/processormaskimpl.h @@ -10,7 +10,7 @@ */ /* - * Copyright (C) 2016, 2023 embedded brains GmbH & Co. KG + * Copyright (C) 2016, 2026 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -297,7 +297,7 @@ static inline uint32_t _Processor_mask_To_uint32_t( uint32_t index ) { - long bits = mask->__bits[ index / _BITSET_BITS ]; + unsigned long bits = mask->__bits[ index / _BITSET_BITS ]; return (uint32_t) ( bits >> ( 32 * ( ( index % _BITSET_BITS ) / 32 ) ) ); } @@ -317,7 +317,7 @@ static inline void _Processor_mask_From_uint32_t( ) { _Processor_mask_Zero( mask ); - mask->__bits[ __bitset_words( index ) ] = ( (long) bits ) + mask->__bits[ __bitset_words( index ) ] = ( (unsigned long) bits ) << ( 32 * ( index % _BITSET_BITS ) / 32 ); @@ -377,10 +377,10 @@ static inline bool _Processor_mask_Is_at_most_partial_loss( * is invalid (bigger than the size of a long). */ Processor_mask_Copy_status _Processor_mask_Copy( - long *dst, - size_t dst_size, - const long *src, - size_t src_size + unsigned long *dst, + size_t dst_size, + const unsigned long *src, + size_t src_size ); /** diff --git a/cpukit/score/src/processormaskcopy.c b/cpukit/score/src/processormaskcopy.c index 3f1c2cf250..a452d3f36e 100644 --- a/cpukit/score/src/processormaskcopy.c +++ b/cpukit/score/src/processormaskcopy.c @@ -11,7 +11,7 @@ */ /* - * Copyright (c) 2017 embedded brains GmbH & Co. KG + * Copyright (c) 2017, 2026 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,40 +44,40 @@ const Processor_mask _Processor_mask_The_one_and_only = { .__bits[ 0 ] = 1 }; Processor_mask_Copy_status _Processor_mask_Copy( - long *dst, - size_t dst_size, - const long *src, - size_t src_size + unsigned long *dst, + size_t dst_size, + const unsigned long *src, + size_t src_size ) { - long inclusive = 0; - long exclusive = 0; + unsigned long inclusive = 0; + unsigned long exclusive = 0; - if ( ( dst_size | src_size ) % sizeof( long ) != 0 ) { + if ( ( dst_size | src_size ) % sizeof( unsigned long ) != 0 ) { return PROCESSOR_MASK_COPY_INVALID_SIZE; } while ( dst_size > 0 && src_size > 0 ) { - long bits = *src; + unsigned long bits = *src; inclusive |= bits; *dst = bits; ++dst; ++src; - dst_size -= sizeof( long ); - src_size -= sizeof( long ); + dst_size -= sizeof( unsigned long ); + src_size -= sizeof( unsigned long ); } while ( dst_size > 0 ) { *dst = 0; ++dst; - dst_size -= sizeof( long ); + dst_size -= sizeof( unsigned long ); } while ( src_size > 0 ) { exclusive |= *src; ++src; - src_size -= sizeof( long ); + src_size -= sizeof( unsigned long ); } if ( exclusive != 0 ) {