[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] sys_thread_new and compiler errors reported by
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] sys_thread_new and compiler errors reported by diab |
Date: |
Thu, 09 Jan 2003 00:19:01 -0000 |
Hi!
On Thursday 15 November 2001 13.08, you wrote:
> Iam not sure if the issues below have been considered in the latest
> release. Iam using version 0.4.2 as yet. Iam sorry, if its already been
> taken care of.
>
> A)
> Some of the OS (like ucos-ii) need additional arguments to the function
> that creates a task/thread. The arguments like a task stack (stack size or
> pointer to task stack) and task priority is required. It would be nice if
> the sys_thread_new handled these new input variables in the lwip code. The
> sys_arch for a specific arch can use the inputs to the sys_thread_new as
> required. Your comments ...
I agree with Peter here, sys_thread_new() shouldn't be cluttred with
OS-specific stuff. A better way to do it would be to implement an OS specific
sys_arch_thread_new() function that can take any number of arguments such as
priority, stack size, etc. The sys_thread_new() function could the easily be
implemented using the sys_arch_thread_new(); something like:
void sys_thread_new(func, arg) {
sys_arch_thread_new(func, arg, DEFAULT_PRIO, DEFAULT_STACKSIZE);
}
sys_thread_new() is only used in one place in the lwIP code, in the file
/src/api/tcpip.c and is used for starting the TCP/IP thread.
sys_arch_thread_new() could be used for network drivers and application
programs if they want to use lwIP functions such as the sys_arch stuff and
the API defined in /src/include/lwip/api.h.
> B)
> Trying to compile 0.4.2 version with diab compiler enabling compiler lint
> options. The compiler caught a few obvious errors. Thought, Adam could get
> them fixed in the next release.
Thanks!
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] sys_thread_new and compiler errors reported by diab,
Adam Dunkels <=