Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions FreeRTOS/Demo/Common/Minimal/TaskNotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static uint32_t ulTimerNotificationsReceived = 0UL, ulTimerNotificationsSent = 0
static TimerHandle_t xTimer = NULL;

/* Used by the pseudo random number generating function. */
static size_t uxNextRand = 0;
static uint32_t uxNextRand = 0;

/*-----------------------------------------------------------*/

Expand All @@ -121,7 +121,7 @@ void vStartTaskNotifyTask( void )
&xTaskToNotify ); /* Used to pass a handle to the task out is needed, otherwise set to NULL. */

/* Pseudo seed the random number generator. */
uxNextRand = ( size_t ) prvRand;
uxNextRand = ( uint32_t ) prvRand;
}
/*-----------------------------------------------------------*/

Expand Down Expand Up @@ -712,10 +712,10 @@ BaseType_t xAreTaskNotificationTasksStillRunning( void )

static UBaseType_t prvRand( void )
{
const size_t uxMultiplier = ( size_t ) 0x015a4e35, uxIncrement = ( size_t ) 1;
const uint32_t uxMultiplier = ( uint32_t ) 0x015a4e35, uxIncrement = ( uint32_t ) 1;

/* Utility function to generate a pseudo random number. */
uxNextRand = ( uxMultiplier * uxNextRand ) + uxIncrement;
return( ( uxNextRand >> 16 ) & ( ( size_t ) 0x7fff ) );
return( ( uxNextRand >> 16 ) & ( ( uint32_t ) 0x7fff ) );
}
/*-----------------------------------------------------------*/
8 changes: 4 additions & 4 deletions FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static TimerHandle_t xIncrementingIndexTimer = NULL;
static TimerHandle_t xNotifyWhileSuspendedTimer = NULL;

/* Used by the pseudo random number generating function. */
static size_t uxNextRand = 0;
static uint32_t uxNextRand = 0;

/* Used to communicate when to send a task notification to the tick hook tests. */
static volatile BaseType_t xSendNotificationFromISR = pdFALSE;
Expand Down Expand Up @@ -166,7 +166,7 @@ void vStartTaskNotifyArrayTask( void )
&xTaskToNotify ); /* Used to pass a handle to the task out if needed, otherwise set to NULL. */

/* Pseudo seed the random number generator. */
uxNextRand = ( size_t ) prvRand;
uxNextRand = ( uint32_t ) prvRand;
}
/*-----------------------------------------------------------*/

Expand Down Expand Up @@ -1209,10 +1209,10 @@ BaseType_t xAreTaskNotificationArrayTasksStillRunning( void )

static UBaseType_t prvRand( void )
{
const size_t uxMultiplier = ( size_t ) 0x015a4e35, uxIncrement = ( size_t ) 1;
const uint32_t uxMultiplier = ( uint32_t ) 0x015a4e35, uxIncrement = ( uint32_t ) 1;

/* Utility function to generate a pseudo random number. */
uxNextRand = ( uxMultiplier * uxNextRand ) + uxIncrement;
return( ( uxNextRand >> 16 ) & ( ( size_t ) 0x7fff ) );
return( ( uxNextRand >> 16 ) & ( ( uint32_t ) 0x7fff ) );
}
/*-----------------------------------------------------------*/
Loading