Changeset b04b76c6 in rtems
- Timestamp:
- 06/07/16 19:36:48 (7 years ago)
- Branches:
- 5, master
- Children:
- bf021daf
- Parents:
- 18e29faf
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/07/16 19:36:48)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/08/16 13:48:03)
- Location:
- cpukit/score
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/cpu/arm/rtems/score/types.h
r18e29faf rb04b76c6 41 41 typedef uintptr_t CPU_Uint32ptr; 42 42 43 typedef uint16_t Priority_bit_map_Word;44 45 43 /** @} */ 46 44 -
cpukit/score/cpu/bfin/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef uintptr_t CPU_Uint32ptr; 36 36 37 /** This defines the type for a priority bit map entry. */38 typedef uint16_t Priority_bit_map_Word;39 40 37 /** This defines the return type for an ISR entry point. */ 41 38 typedef void blackfin_isr; -
cpukit/score/cpu/epiphany/rtems/score/cpu.h
r18e29faf rb04b76c6 700 700 701 701 #ifndef ASM 702 typedef uint16_t Priority_bit_map_Word;703 702 704 703 typedef struct { -
cpukit/score/cpu/epiphany/rtems/score/types.h
r18e29faf rb04b76c6 54 54 typedef uintptr_t CPU_Uint32ptr; 55 55 56 typedef uint16_t Priority_bit_map_Word;57 56 typedef void epiphany_isr; 58 57 typedef void ( *epiphany_isr_entry )( void ); -
cpukit/score/cpu/i386/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef uintptr_t CPU_Uint32ptr; 36 36 37 typedef uint16_t Priority_bit_map_Word;38 37 typedef void i386_isr; 39 38 typedef i386_isr ( *i386_isr_entry )( void ); -
cpukit/score/cpu/lm32/rtems/score/types.h
r18e29faf rb04b76c6 38 38 typedef uintptr_t CPU_Uint32ptr; 39 39 40 /** This defines the type for a priority bit map entry. */41 typedef uint16_t Priority_bit_map_Word;42 43 40 #ifdef __cplusplus 44 41 } -
cpukit/score/cpu/m32c/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef unsigned long CPU_Uint32ptr; 36 36 37 /** This defines the type for a priority bit map entry. */38 typedef uint16_t Priority_bit_map_Word;39 40 37 /** This defines the return type for an ISR entry point. */ 41 38 typedef void m32c_isr; -
cpukit/score/cpu/m68k/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef uintptr_t CPU_Uint32ptr; 36 36 37 typedef uint16_t Priority_bit_map_Word;38 39 37 #ifdef __cplusplus 40 38 } -
cpukit/score/cpu/mips/rtems/score/types.h
r18e29faf rb04b76c6 44 44 typedef uintptr_t CPU_Uint32ptr; 45 45 46 typedef uint16_t Priority_bit_map_Word;47 46 typedef void mips_isr; 48 47 typedef void ( *mips_isr_entry )( void ); -
cpukit/score/cpu/moxie/rtems/score/types.h
r18e29faf rb04b76c6 39 39 typedef uintptr_t CPU_Uint32ptr; 40 40 41 typedef uint16_t Priority_bit_map_Word;42 41 typedef void moxie_isr; 43 42 typedef void ( *moxie_isr_entry )( void ); -
cpukit/score/cpu/nios2/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef uintptr_t CPU_Uint32ptr; 36 36 37 typedef uint16_t Priority_bit_map_Word;38 37 typedef void nios2_isr; 39 38 typedef void ( *nios2_isr_entry )( void ); -
cpukit/score/cpu/no_cpu/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef uintptr_t CPU_Uint32ptr; 36 36 37 /** This defines the type for a priority bit map entry. */38 typedef uint16_t Priority_bit_map_Word;39 40 37 #ifdef __cplusplus 41 38 } -
cpukit/score/cpu/or1k/rtems/score/cpu.h
r18e29faf rb04b76c6 688 688 #ifndef ASM 689 689 typedef uint32_t CPU_Counter_ticks; 690 typedef uint16_t Priority_bit_map_Word;691 690 692 691 typedef struct { -
cpukit/score/cpu/or1k/rtems/score/types.h
r18e29faf rb04b76c6 40 40 typedef uintptr_t CPU_Uint32ptr; 41 41 42 typedef uint16_t Priority_bit_map_Word;43 42 typedef void or1k_isr; 44 43 typedef void ( *or1k_isr_entry )( void ); -
cpukit/score/cpu/powerpc/rtems/score/cpu.h
r18e29faf rb04b76c6 982 982 __asm__ volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \ 983 983 "1" ((_value))); \ 984 (_output) = (_output) - 16; \ 984 985 } 985 986 … … 993 994 994 995 #define _CPU_Priority_Mask( _bit_number ) \ 995 ( 0x8000 0000>> (_bit_number) )996 ( 0x8000u >> (_bit_number) ) 996 997 997 998 /* -
cpukit/score/cpu/powerpc/rtems/score/types.h
r18e29faf rb04b76c6 52 52 typedef uintptr_t CPU_Uint32ptr; 53 53 54 typedef uint32_t Priority_bit_map_Word;55 54 typedef void ppc_isr; 56 55 -
cpukit/score/cpu/sh/rtems/score/types.h
r18e29faf rb04b76c6 45 45 typedef uintptr_t CPU_Uint32ptr; 46 46 47 typedef uint16_t Priority_bit_map_Word;48 49 47 typedef void sh_isr; 50 48 typedef void ( *sh_isr_entry )( void ); -
cpukit/score/cpu/sparc/rtems/score/types.h
r18e29faf rb04b76c6 32 32 33 33 /** 34 * @brief Priority bit map type.35 *36 * On the SPARC, there is no bitscan instruction and no penalty associated37 * for using 16-bit variables. With no overriding architectural factors,38 * just using a uint16_t.39 */40 typedef uint16_t Priority_bit_map_Word;41 42 /**43 34 * @brief SPARC ISR handler return type. 44 35 * -
cpukit/score/cpu/sparc64/rtems/score/types.h
r18e29faf rb04b76c6 34 34 typedef uintptr_t CPU_Uint32ptr; 35 35 36 typedef uint16_t Priority_bit_map_Word;37 36 typedef void sparc_isr; 38 37 typedef void ( *sparc_isr_entry )( void ); -
cpukit/score/cpu/v850/rtems/score/types.h
r18e29faf rb04b76c6 35 35 typedef uintptr_t CPU_Uint32ptr; 36 36 37 /** This defines the type for a priority bit map entry. */38 typedef uint16_t Priority_bit_map_Word;39 40 37 #ifdef __cplusplus 41 38 } -
cpukit/score/include/rtems/score/prioritybitmap.h
r18e29faf rb04b76c6 33 33 /**@{*/ 34 34 35 /* 36 * The definition of the Priority_bit_map_Word type is CPU dependent. 37 * 38 */ 35 typedef uint16_t Priority_bit_map_Word; 39 36 40 37 typedef struct { -
cpukit/score/include/rtems/score/prioritybitmapimpl.h
r18e29faf rb04b76c6 21 21 22 22 #include <rtems/score/prioritybitmap.h> 23 #include <rtems/score/priority.h>24 23 25 24 #include <string.h> … … 66 65 #define _Bitfield_Find_first_bit( _value, _bit_number ) \ 67 66 { \ 68 register uint32_t __value = (uint32_t)(_value); \69 registerconst unsigned char *__p = _Bitfield_Leading_zeros; \67 unsigned int __value = (_value); \ 68 const unsigned char *__p = _Bitfield_Leading_zeros; \ 70 69 \ 71 70 if ( __value < 0x100 ) \ … … 109 108 */ 110 109 111 RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Major ( 112 Priority_Control the_priority 113 ) 114 { 115 return (Priority_bit_map_Word)( the_priority / 16 ); 110 RTEMS_INLINE_ROUTINE unsigned int _Priority_Major( unsigned int the_priority ) 111 { 112 return the_priority / 16; 116 113 } 117 114 … … 120 117 */ 121 118 122 RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Minor ( 123 Priority_Control the_priority 124 ) 125 { 126 return (Priority_bit_map_Word)( the_priority % 16 ); 119 RTEMS_INLINE_ROUTINE unsigned int _Priority_Minor( unsigned int the_priority ) 120 { 121 return the_priority % 16; 127 122 } 128 123 … … 135 130 136 131 RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask ( 137 u int32_tbit_number132 unsigned int bit_number 138 133 ) 139 134 { 140 135 return (Priority_bit_map_Word)(0x8000u >> bit_number); 141 }142 143 /**144 * This function returns the mask bit inverted.145 */146 147 RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask_invert (148 uint32_t mask149 )150 {151 return (Priority_bit_map_Word)(~mask);152 136 } 153 137 … … 158 142 */ 159 143 160 RTEMS_INLINE_ROUTINE u int32_t _Priority_Bits_index(161 u int32_tbit_number144 RTEMS_INLINE_ROUTINE unsigned int _Priority_Bits_index( 145 unsigned int bit_number 162 146 ) 163 147 { … … 197 181 } 198 182 199 RTEMS_INLINE_ROUTINE Priority_Control_Priority_bit_map_Get_highest(183 RTEMS_INLINE_ROUTINE unsigned int _Priority_bit_map_Get_highest( 200 184 const Priority_bit_map_Control *bit_map 201 185 ) 202 186 { 203 Priority_bit_map_Wordminor;204 Priority_bit_map_Wordmajor;187 unsigned int minor; 188 unsigned int major; 205 189 206 190 /* Avoid problems with some inline ASM statements */ 207 Priority_bit_map_Wordtmp;191 unsigned int tmp; 208 192 209 193 tmp = bit_map->major_bit_map; … … 227 211 Priority_bit_map_Control *bit_map, 228 212 Priority_bit_map_Information *bit_map_info, 229 Priority_Controlnew_priority230 ) 231 { 232 Priority_bit_map_Wordmajor;233 Priority_bit_map_Wordminor;213 unsigned int new_priority 214 ) 215 { 216 unsigned int major; 217 unsigned int minor; 234 218 Priority_bit_map_Word mask; 235 219 … … 241 225 mask = _Priority_Mask( major ); 242 226 bit_map_info->ready_major = mask; 243 /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ 244 bit_map_info->block_major = (Priority_bit_map_Word)(~((uint32_t)mask)); 227 bit_map_info->block_major = (Priority_bit_map_Word) ~mask; 245 228 246 229 mask = _Priority_Mask( minor ); 247 230 bit_map_info->ready_minor = mask; 248 /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ 249 bit_map_info->block_minor = (Priority_bit_map_Word)(~((uint32_t)mask)); 231 bit_map_info->block_minor = (Priority_bit_map_Word) ~mask; 250 232 } 251 233
Note: See TracChangeset
for help on using the changeset viewer.