mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types.
This commit is contained in:
parent
b4116a7c7d
commit
da93f1fc4b
261 changed files with 2822 additions and 2815 deletions
|
@ -153,14 +153,14 @@ void vStartRecursiveMutexTasks( void )
|
|||
is not being used. The call to vQueueAddToRegistry() will be removed
|
||||
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
|
||||
defined to be less than 1. */
|
||||
vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Recursive_Mutex" );
|
||||
vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" );
|
||||
|
||||
|
||||
if( xMutex != NULL )
|
||||
{
|
||||
xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexControllingTask, "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexBlockingTask, "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle );
|
||||
xTaskCreate( prvRecursiveMutexPollingTask, "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -105,7 +105,7 @@ mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two.
|
|||
The simply blinky demo is implemented and described in main_blinky.c. The more
|
||||
comprehensive test and demo application is implemented and described in
|
||||
main_full.c. */
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
|
||||
|
||||
/*
|
||||
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
||||
|
@ -143,19 +143,17 @@ static portBASE_TYPE xTraceRunning = pdTRUE;
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
int main( void )
|
||||
{
|
||||
/* Initialise the trace recorder and create the label used to post user
|
||||
events to the trace recording on each tick interrupt. */
|
||||
vTraceInitTraceData();
|
||||
printf( "Trace started. Hit a key to dump trace file to disk. Note stdin does not work when using the Eclipse console with MingW.\r\n" );
|
||||
fflush( stdout );
|
||||
|
||||
xTickTraceUserEvent = xTraceOpenLabel( "tick" );
|
||||
|
||||
/* Start the trace recording - the recording is written to a file if
|
||||
configASSERT() is called. */
|
||||
printf( "\r\nTrace started. Hit a key to dump trace file to disk (does not work from Eclipse console).\r\n" );
|
||||
fflush( stdout );
|
||||
uiTraceStart();
|
||||
|
||||
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
|
||||
|
@ -203,7 +201,7 @@ void vApplicationIdleHook( void )
|
|||
memory allocated by the kernel to any task that has since been deleted. */
|
||||
|
||||
/* The trace can be stopped with any key press. */
|
||||
if( kbhit() != pdFALSE )
|
||||
if( _kbhit() != pdFALSE )
|
||||
{
|
||||
if( xTraceRunning == pdTRUE )
|
||||
{
|
||||
|
@ -260,6 +258,8 @@ void vApplicationTickHook( void )
|
|||
|
||||
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
|
||||
{
|
||||
static portBASE_TYPE xPrinted = pdFALSE;
|
||||
|
||||
/* Parameters are not used. */
|
||||
( void ) ulLine;
|
||||
( void ) pcFileName;
|
||||
|
@ -268,10 +268,14 @@ void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
|
|||
__asm volatile( "int $3" );
|
||||
|
||||
/* Stop the trace recording. */
|
||||
if( xTraceRunning == pdTRUE )
|
||||
if( xPrinted == pdFALSE )
|
||||
{
|
||||
xPrinted = pdTRUE;
|
||||
if( xTraceRunning == pdTRUE )
|
||||
{
|
||||
vTraceStop();
|
||||
prvSaveTraceFile();
|
||||
}
|
||||
}
|
||||
|
||||
taskENABLE_INTERRUPTS();
|
||||
|
@ -289,11 +293,9 @@ FILE* pxOutputFile;
|
|||
fwrite( RecorderDataPtr, sizeof( RecorderDataType ), 1, pxOutputFile );
|
||||
fclose( pxOutputFile );
|
||||
printf( "\r\nTrace output saved to Trace.dump\r\n" );
|
||||
fflush( stdout );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "\r\nFailed to create trace dump file\r\n" );
|
||||
fflush( stdout );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,13 +165,13 @@ void main_blinky( void )
|
|||
/* Start the two tasks as described in the comments at the top of this
|
||||
file. */
|
||||
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
|
||||
( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
||||
( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */
|
||||
mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */
|
||||
NULL ); /* The task handle is not required, so NULL is passed. */
|
||||
|
||||
xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the tasks and timer running. */
|
||||
vTaskStartScheduler();
|
||||
|
|
|
@ -181,7 +181,7 @@ static xSemaphoreHandle xMutexToDelete = NULL;
|
|||
int main_full( void )
|
||||
{
|
||||
/* Start the check task as described at the top of this file. */
|
||||
xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create the standard demo tasks. */
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
|
@ -196,7 +196,7 @@ int main_full( void )
|
|||
vStartDynamicPriorityTasks();
|
||||
vStartQueueSetTasks();
|
||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||
xTaskCreate( prvDemoQueueSpaceFunctions, ( signed char * ) "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
vStartEventGroupTasks();
|
||||
|
||||
#if( configUSE_PREEMPTION != 0 )
|
||||
|
@ -410,7 +410,7 @@ static void prvDemonstrateTaskStateAndHandleGetFunctions( void )
|
|||
{
|
||||
xTaskHandle xIdleTaskHandle, xTimerTaskHandle;
|
||||
const unsigned char ucConstTaskNumber = 0x55U;
|
||||
signed char *pcTaskName;
|
||||
char *pcTaskName;
|
||||
static portBASE_TYPE xPerformedOneShotTests = pdFALSE;
|
||||
xTaskHandle xTestTask;
|
||||
|
||||
|
@ -457,7 +457,7 @@ xTaskHandle xTestTask;
|
|||
xPerformedOneShotTests = pdTRUE;
|
||||
|
||||
/* Create a test task to use to test other eTaskStateGet() return values. */
|
||||
if( xTaskCreate( prvTestTask, ( const signed char * const ) "Test", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTestTask ) == pdPASS )
|
||||
if( xTaskCreate( prvTestTask, "Test", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTestTask ) == pdPASS )
|
||||
{
|
||||
/* If this task is running, the test task must be in the ready state. */
|
||||
if( eTaskStateGet( xTestTask ) != eReady )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue