X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Flwip%2Fsrc%2Farch%2Fsys_arch.c;h=adbb8fbc6a0d0c5af373e906bf0aa6c360565b72;hb=e957b9c1c7935ab27d2b7f96fded1914f303ddec;hp=e33f2364f54c4598947b0bc889e40e5787875bfd;hpb=c46c583b388005935bf1533fd7ac94c91c4d21d7;p=bertos.git diff --git a/bertos/net/lwip/src/arch/sys_arch.c b/bertos/net/lwip/src/arch/sys_arch.c index e33f2364..adbb8fbc 100644 --- a/bertos/net/lwip/src/arch/sys_arch.c +++ b/bertos/net/lwip/src/arch/sys_arch.c @@ -317,15 +317,6 @@ static struct sys_timeouts lwip_system_timeouts; // Default timeouts list for lw struct sys_timeouts *sys_arch_timeouts(void) { - ThreadNode *thread_node; - struct Process *curr_pid = proc_current(); - - FOREACH_NODE(thread_node, &used_thread) - { - if (thread_node->pid == curr_pid) - return &(thread_node->timeout); - } - return &lwip_system_timeouts; } @@ -348,7 +339,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 +360,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 +371,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;