diff --git a/portable/MSVC-MingW/portmacro.h b/portable/MSVC-MingW/portmacro.h index 1a4cd1622..37bfb2586 100644 --- a/portable/MSVC-MingW/portmacro.h +++ b/portable/MSVC-MingW/portmacro.h @@ -145,22 +145,25 @@ void vPortExitCritical( void ); : "cc" ) #else /* __GNUC__ */ + #include /* BitScanReverse returns the bit position of the most significant '1' * in the word. */ #if defined( __x86_64__ ) || defined( _M_X64 ) + #pragma intrinsic(_BitScanReverse64) #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) \ do \ { \ - DWORD ulTopPriority; \ + unsigned long ulTopPriority; \ _BitScanReverse64( &ulTopPriority, ( uxReadyPriorities ) ); \ uxTopPriority = ulTopPriority; \ } while( 0 ) #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 ) */