mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
[MSVC-MingW] Include correct header for compiler intrinsics
This commit is contained in:
parent
b27722a30e
commit
7381ffd414
1 changed files with 5 additions and 2 deletions
|
@ -145,22 +145,25 @@ void vPortExitCritical( void );
|
||||||
: "cc" )
|
: "cc" )
|
||||||
|
|
||||||
#else /* __GNUC__ */
|
#else /* __GNUC__ */
|
||||||
|
#include <intrin.h>
|
||||||
|
|
||||||
/* BitScanReverse returns the bit position of the most significant '1'
|
/* BitScanReverse returns the bit position of the most significant '1'
|
||||||
* in the word. */
|
* in the word. */
|
||||||
#if defined( __x86_64__ ) || defined( _M_X64 )
|
#if defined( __x86_64__ ) || defined( _M_X64 )
|
||||||
|
#pragma intrinsic(_BitScanReverse64)
|
||||||
|
|
||||||
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) \
|
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
DWORD ulTopPriority; \
|
unsigned long ulTopPriority; \
|
||||||
_BitScanReverse64( &ulTopPriority, ( uxReadyPriorities ) ); \
|
_BitScanReverse64( &ulTopPriority, ( uxReadyPriorities ) ); \
|
||||||
uxTopPriority = ulTopPriority; \
|
uxTopPriority = ulTopPriority; \
|
||||||
} while( 0 )
|
} while( 0 )
|
||||||
|
|
||||||
#else /* #if defined( __x86_64__ ) || defined( _M_X64 ) */
|
#else /* #if defined( __x86_64__ ) || defined( _M_X64 ) */
|
||||||
|
#pragma intrinsic(_BitScanReverse)
|
||||||
|
|
||||||
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) _BitScanReverse( ( DWORD * ) &( uxTopPriority ), ( uxReadyPriorities ) )
|
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) _BitScanReverse( ( unsigned long * ) &( uxTopPriority ), ( uxReadyPriorities ) )
|
||||||
|
|
||||||
#endif /* #if defined( __x86_64__ ) || defined( _M_X64 ) */
|
#endif /* #if defined( __x86_64__ ) || defined( _M_X64 ) */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue