X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Flwip%2Fsrc%2Farch%2Fsys_arch.c;h=0d1ade5ce6a5dd77114d7f03704f40dfd25d0985;hb=69189320a33089d77c2623698c583a7a0fc48702;hp=a7feddbd19a795f0e2667128f7d9be4ade7c347b;hpb=08b11a3ad6e293343bfab98a7439a26079db5dea;p=bertos.git diff --git a/bertos/net/lwip/src/arch/sys_arch.c b/bertos/net/lwip/src/arch/sys_arch.c index a7feddbd..0d1ade5c 100644 --- a/bertos/net/lwip/src/arch/sys_arch.c +++ b/bertos/net/lwip/src/arch/sys_arch.c @@ -1,4 +1,4 @@ -#include +#include "cfg/cfg_lwip.h" #define LOG_LEVEL 3 #define LOG_FORMAT 0 @@ -348,7 +348,7 @@ static cpu_stack_t thread_stack[MAX_THREAD_CNT] static int last_stack; #endif -sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), +sys_thread_t sys_thread_new(const char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio) { ThreadNode *thread_node; @@ -369,7 +369,7 @@ sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), #if !CONFIG_KERN_HEAP ASSERT(stacksize <= DEFAULT_THREAD_STACKSIZE); - PROC_ATOMIC(stackbase = &thread_stack[last_stack++]); + PROC_ATOMIC(stackbase = thread_stack[last_stack++]); #else stackbase = NULL; #endif @@ -380,6 +380,9 @@ sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), #if CONFIG_KERN_PRI proc_setPri(thread_node->pid, prio); + #else + /* Avoid warnings when priorities are disabled */ + (void) prio; #endif return thread_node->pid;