mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-27 01:28:16 +00:00
Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types.
This commit is contained in:
@@ -501,7 +501,7 @@ const unsigned char ucMACAddress[6] =
|
||||
#endif
|
||||
|
||||
/* Create the task that handles the EMAC. */
|
||||
xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", configETHERNET_INPUT_TASK_STACK_SIZE, (void *)netif, configETHERNET_INPUT_TASK_PRIORITY, &xEthIntTask );
|
||||
xTaskCreate( ethernetif_input, "ETH_INT", configETHERNET_INPUT_TASK_STACK_SIZE, (void *)netif, configETHERNET_INPUT_TASK_PRIORITY, &xEthIntTask );
|
||||
|
||||
fec_irq_enable();
|
||||
MCF_FEC_ECR = MCF_FEC_ECR_ETHER_EN;
|
||||
|
||||
@@ -131,7 +131,7 @@ sys_arch_unprotect( sys_prot_t pval )
|
||||
*/
|
||||
void
|
||||
sys_assert( const char *msg )
|
||||
{
|
||||
{
|
||||
/*FSL:only needed for debugging
|
||||
printf(msg);
|
||||
printf("\n\r");
|
||||
@@ -204,7 +204,7 @@ sys_thread_new(char *name, void ( *thread ) ( void *arg ), void *arg, int /*size
|
||||
THREAD_INIT( p );
|
||||
|
||||
/* Now q points to a free element in the list. */
|
||||
if( xTaskCreate( thread, (const signed char *const)name, stacksize, arg, prio, &p->pid ) == pdPASS )
|
||||
if( xTaskCreate( thread, name, stacksize, arg, prio, &p->pid ) == pdPASS )
|
||||
{
|
||||
thread_hdl = p;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ sys_arch_thread_remove( sys_thread_t hdl )
|
||||
vPortFree( toremove );
|
||||
}
|
||||
}
|
||||
/* We are done with accessing the shared datastructure. Release the
|
||||
/* We are done with accessing the shared datastructure. Release the
|
||||
* resources.
|
||||
*/
|
||||
vPortExitCritical( );
|
||||
@@ -489,7 +489,7 @@ sys_mbox_post( sys_mbox_t mbox, void *data )
|
||||
}
|
||||
|
||||
/*FSL*/
|
||||
/*
|
||||
/*
|
||||
*Try to post the "msg" to the mailbox. Returns ERR_MEM if this one
|
||||
*is full, else, ERR_OK if the "msg" is posted.
|
||||
*/
|
||||
|
||||
@@ -55,9 +55,9 @@ static u16_t s_nextthread = 0;
|
||||
sys_mbox_t sys_mbox_new(int size)
|
||||
{
|
||||
xQueueHandle mbox;
|
||||
|
||||
|
||||
( void ) size;
|
||||
|
||||
|
||||
mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) );
|
||||
|
||||
#if SYS_STATS
|
||||
@@ -85,7 +85,7 @@ void sys_mbox_free(sys_mbox_t mbox)
|
||||
#if SYS_STATS
|
||||
lwip_stats.sys.mbox.err++;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
|
||||
// TODO notify the user of failure.
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ err_t result;
|
||||
else {
|
||||
// could not post, queue must be full
|
||||
result = ERR_MEM;
|
||||
|
||||
|
||||
#if SYS_STATS
|
||||
lwip_stats.sys.mbox.err++;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -154,20 +154,20 @@ portTickType StartTime, EndTime, Elapsed;
|
||||
{
|
||||
msg = &dummyptr;
|
||||
}
|
||||
|
||||
|
||||
if ( timeout != 0 )
|
||||
{
|
||||
if ( pdTRUE == xQueueReceive( mbox, &(*msg), timeout / portTICK_RATE_MS ) )
|
||||
{
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
|
||||
return ( Elapsed );
|
||||
}
|
||||
else // timed out blocking for message
|
||||
{
|
||||
*msg = NULL;
|
||||
|
||||
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
}
|
||||
}
|
||||
@@ -176,8 +176,8 @@ portTickType StartTime, EndTime, Elapsed;
|
||||
while( pdTRUE != xQueueReceive( mbox, &(*msg), portMAX_DELAY ) ){} // time is arbitrary
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return ( Elapsed ); // return time blocked TODO test
|
||||
|
||||
return ( Elapsed ); // return time blocked TODO test
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,17 +213,17 @@ sys_sem_t sys_sem_new(u8_t count)
|
||||
xSemaphoreHandle xSemaphore;
|
||||
|
||||
vSemaphoreCreateBinary( xSemaphore );
|
||||
|
||||
|
||||
if( xSemaphore == NULL )
|
||||
{
|
||||
|
||||
|
||||
#if SYS_STATS
|
||||
++lwip_stats.sys.sem.err;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
|
||||
return SYS_SEM_NULL; // TODO need assert
|
||||
}
|
||||
|
||||
|
||||
if(count == 0) // Means it can't be taken
|
||||
{
|
||||
xSemaphoreTake(xSemaphore,1);
|
||||
@@ -235,7 +235,7 @@ sys_sem_t sys_sem_new(u8_t count)
|
||||
lwip_stats.sys.sem.max = lwip_stats.sys.sem.used;
|
||||
}
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
|
||||
return xSemaphore;
|
||||
}
|
||||
|
||||
@@ -267,8 +267,8 @@ portTickType StartTime, EndTime, Elapsed;
|
||||
{
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return (Elapsed); // return time blocked TODO test
|
||||
|
||||
return (Elapsed); // return time blocked TODO test
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -281,8 +281,8 @@ portTickType StartTime, EndTime, Elapsed;
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return ( Elapsed ); // return time blocked
|
||||
|
||||
return ( Elapsed ); // return time blocked
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ void sys_sem_free(sys_sem_t sem)
|
||||
#if SYS_STATS
|
||||
--lwip_stats.sys.sem.used;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
|
||||
vQueueDelete( sem );
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ int result;
|
||||
|
||||
if ( s_nextthread < SYS_THREAD_MAX )
|
||||
{
|
||||
result = xTaskCreate( thread, ( signed portCHAR * ) name, stacksize, arg, prio, &CreatedTask );
|
||||
result = xTaskCreate( thread, name, stacksize, arg, prio, &CreatedTask );
|
||||
|
||||
// For each task created, store the task handle (pid) in the timers array.
|
||||
// This scheme doesn't allow for threads to be deleted
|
||||
@@ -428,7 +428,7 @@ void sys_arch_unprotect(sys_prot_t pval)
|
||||
* Prints an assertion messages and aborts execution.
|
||||
*/
|
||||
void sys_assert( const char *msg )
|
||||
{
|
||||
{
|
||||
( void ) msg;
|
||||
/*FSL:only needed for debugging
|
||||
printf(msg);
|
||||
|
||||
@@ -134,7 +134,7 @@ static void low_level_init(struct netif *netif)
|
||||
netif->flags |= NETIF_FLAG_LINK_UP;
|
||||
|
||||
/* Create the task that handles the EMAC. */
|
||||
xTaskCreate( ethernetif_input, ( signed portCHAR * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, (void *)netif, netifINTERFACE_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, (void *)netif, netifINTERFACE_TASK_PRIORITY, NULL );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -393,16 +393,16 @@ err_t xReturn = ERR_MEM;
|
||||
|
||||
*pxMutex = xSemaphoreCreateMutex();
|
||||
|
||||
if( *pxMutex != NULL )
|
||||
if( *pxMutex != NULL )
|
||||
{
|
||||
xReturn = ERR_OK;
|
||||
SYS_STATS_INC_USED( mutex );
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
SYS_STATS_INC( mutex.err );
|
||||
}
|
||||
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ xTaskHandle xCreatedTask;
|
||||
portBASE_TYPE xResult;
|
||||
sys_thread_t xReturn;
|
||||
|
||||
xResult = xTaskCreate( pxThread, ( signed char * ) pcName, iStackSize, pvArg, iPriority, &xCreatedTask );
|
||||
xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask );
|
||||
|
||||
if( xResult == pdPASS )
|
||||
{
|
||||
|
||||
@@ -327,7 +327,7 @@ unsigned long ulNetMask;
|
||||
/* Create a task that simulates an interrupt in a real system. This will
|
||||
block waiting for packets, then send a message to the uIP task when data
|
||||
is available. */
|
||||
xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL );
|
||||
xTaskCreate( prvInterruptSimulator, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -648,6 +648,6 @@ unsigned long ulNetMask;
|
||||
/* Create a task that simulates an interrupt in a real system. This will
|
||||
block waiting for packets, then send a message to the uIP task when data
|
||||
is available. */
|
||||
xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL );
|
||||
xTaskCreate( prvInterruptSimulator, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL );
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ err_t xReturn;
|
||||
xReturn = ERR_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
/* The queue was already full. */
|
||||
xReturn = ERR_MEM;
|
||||
SYS_STATS_INC( mbox.err );
|
||||
@@ -199,7 +199,7 @@ unsigned long ulReturn;
|
||||
|
||||
ulReturn = xElapsed;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* Timed out. */
|
||||
*ppvBuffer = NULL;
|
||||
@@ -359,22 +359,22 @@ unsigned long ulReturn;
|
||||
/** Create a new mutex
|
||||
* @param mutex pointer to the mutex to create
|
||||
* @return a new mutex */
|
||||
err_t sys_mutex_new( sys_mutex_t *pxMutex )
|
||||
err_t sys_mutex_new( sys_mutex_t *pxMutex )
|
||||
{
|
||||
err_t xReturn = ERR_MEM;
|
||||
|
||||
*pxMutex = xSemaphoreCreateMutex();
|
||||
|
||||
if( *pxMutex != NULL )
|
||||
if( *pxMutex != NULL )
|
||||
{
|
||||
xReturn = ERR_OK;
|
||||
SYS_STATS_INC_USED( mutex );
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
SYS_STATS_INC( mutex.err );
|
||||
}
|
||||
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
@@ -468,7 +468,7 @@ xTaskHandle xCreatedTask;
|
||||
portBASE_TYPE xResult;
|
||||
sys_thread_t xReturn;
|
||||
|
||||
xResult = xTaskCreate( pxThread, ( signed char * ) pcName, iStackSize, pvArg, iPriority, &xCreatedTask );
|
||||
xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask );
|
||||
|
||||
if( xResult == pdPASS )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user