]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c
Start to remove unnecessary 'signed char *' casts from strings that are now just...
[freertos] / FreeRTOS / Demo / lwIP_Demo_Rowley_ARM7 / lwip-1.1.0 / contrib / port / FreeRTOS / AT91SAM7X / sys_arch.c
index 4d39c37cd5d820a18f9b8530d5fe5b82fef8025d..10f3a2d8d1c237333b9966f1538c11b0fb6cbcc4 100644 (file)
@@ -1,8 +1,8 @@
 /*\r
  * Copyright (c) 2001-2003 Swedish Institute of Computer Science.\r
- * All rights reserved. \r
- * \r
- * Redistribution and use in source and binary forms, with or without modification, \r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without modification,\r
  * are permitted provided that the following conditions are met:\r
  *\r
  * 1. Redistributions of source code must retain the above copyright notice,\r
  *    this list of conditions and the following disclaimer in the documentation\r
  *    and/or other materials provided with the distribution.\r
  * 3. The name of the author may not be used to endorse or promote products\r
- *    derived from this software without specific prior written permission. \r
+ *    derived from this software without specific prior written permission.\r
  *\r
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED \r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF \r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT \r
- * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, \r
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT \r
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY \r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\r
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\r
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\r
  * OF SUCH DAMAGE.\r
  *\r
  * This file is part of the lwIP TCP/IP stack.\r
- * \r
+ *\r
  * Author: Adam Dunkels <adam@sics.se>\r
  *\r
  */\r
@@ -40,7 +40,7 @@
 #define archMESG_QUEUE_LENGTH  ( 6 )\r
 #define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 )\r
 \r
-struct timeoutlist \r
+struct timeoutlist\r
 {\r
        struct sys_timeouts timeouts;\r
        xTaskHandle pid;\r
@@ -84,14 +84,14 @@ sys_mbox_free(sys_mbox_t mbox)
                __asm volatile ( "NOP" );\r
        }\r
 \r
-       vQueueDelete( mbox ); \r
+       vQueueDelete( mbox );\r
 }\r
 \r
 /*-----------------------------------------------------------------------------------*/\r
 //   Posts the "msg" to the mailbox.\r
 void\r
 sys_mbox_post(sys_mbox_t mbox, void *data)\r
-{   \r
+{\r
        xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) );\r
 }\r
 \r
@@ -110,7 +110,7 @@ sys_mbox_post(sys_mbox_t mbox, void *data)
   timeout.\r
 \r
   Note that a function with a similar name, sys_mbox_fetch(), is\r
-  implemented by lwIP. \r
+  implemented by lwIP.\r
 */\r
 u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)\r
 {\r
@@ -123,7 +123,7 @@ portTickType StartTime, EndTime, Elapsed;
        {\r
                msg = &dummyptr;\r
        }\r
-               \r
+\r
        if(     timeout != 0 )\r
        {\r
                if(pdTRUE == xQueueReceive( mbox, &(*msg), timeout ) )\r
@@ -154,7 +154,7 @@ portTickType StartTime, EndTime, Elapsed;
                {\r
                        Elapsed = 1;\r
                }\r
-               return ( Elapsed ); // return time blocked TBD test     \r
+               return ( Elapsed ); // return time blocked TBD test\r
        }\r
 }\r
 \r
@@ -217,7 +217,7 @@ portTickType StartTime, EndTime, Elapsed;
                        {\r
                                Elapsed = 1;\r
                        }\r
-                       return (Elapsed); // return time blocked TBD test       \r
+                       return (Elapsed); // return time blocked TBD test\r
                }\r
                else\r
                {\r
@@ -237,8 +237,8 @@ portTickType StartTime, EndTime, Elapsed;
                        Elapsed = 1;\r
                }\r
 \r
-               return ( Elapsed ); // return time blocked      \r
-                \r
+               return ( Elapsed ); // return time blocked\r
+\r
        }\r
 }\r
 \r
@@ -255,7 +255,7 @@ sys_sem_signal(sys_sem_t sem)
 void\r
 sys_sem_free(sys_sem_t sem)\r
 {\r
-       vQueueDelete( sem ); \r
+       vQueueDelete( sem );\r
 }\r
 \r
 /*-----------------------------------------------------------------------------------*/\r
@@ -283,7 +283,7 @@ sys_init(void)
   each thread has a list of timeouts which is represented as a linked\r
   list of sys_timeout structures. The sys_timeouts structure holds a\r
   pointer to a linked list of timeouts. This function is called by\r
-  the lwIP timeout scheduler and must not return a NULL value. \r
+  the lwIP timeout scheduler and must not return a NULL value.\r
 \r
   In a single threaded sys_arch implementation, this function will\r
   simply return a pointer to a global sys_timeouts variable stored in\r
@@ -294,14 +294,14 @@ sys_arch_timeouts(void)
 {\r
 int i;\r
 xTaskHandle pid;\r
-struct timeoutlist *tl;  \r
+struct timeoutlist *tl;\r
 \r
-       pid = xTaskGetCurrentTaskHandle( ); \r
+       pid = xTaskGetCurrentTaskHandle( );\r
 \r
-       for(i = 0; i < nextthread; i++) \r
+       for(i = 0; i < nextthread; i++)\r
        {\r
                tl = &timeoutlist[i];\r
-               if(tl->pid == pid) \r
+               if(tl->pid == pid)\r
                {\r
                        return &(tl->timeouts);\r
                }\r
@@ -313,7 +313,7 @@ struct timeoutlist *tl;
 \r
 /*-----------------------------------------------------------------------------------*/\r
 /*-----------------------------------------------------------------------------------*/\r
-// TBD \r
+// TBD\r
 /*-----------------------------------------------------------------------------------*/\r
 /*\r
   Starts a new thread with priority "prio" that will begin its execution in the\r
@@ -330,12 +330,12 @@ static int iCall = 0;
        if( iCall == 0 )\r
        {\r
                /* The first time this is called we are creating the lwIP handler. */\r
-               result = xTaskCreate( thread, ( signed char * ) "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask );\r
+               result = xTaskCreate( thread, "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask );\r
                iCall++;\r
        }\r
        else\r
        {\r
-               result = xTaskCreate( thread, ( signed char * ) "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask );\r
+               result = xTaskCreate( thread, "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask );\r
        }\r
 \r
        // For each task created, store the task handle (pid) in the timers array.\r
@@ -378,7 +378,7 @@ sys_prot_t sys_arch_protect(void)
   an operating system.\r
 */\r
 void sys_arch_unprotect(sys_prot_t pval)\r
-{ \r
+{\r
        ( void ) pval;\r
        vPortExitCritical();\r
 }\r