[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #7252] Create sys_thread_new_ex()
From: |
Bill Florac |
Subject: |
[lwip-devel] [task #7252] Create sys_thread_new_ex() |
Date: |
Tue, 28 Aug 2007 19:34:57 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) |
Follow-up Comment #1, task #7252 (project lwip):
Some more details:
Currently, in sys_thread_new(), there is no easy way of knowing what process
is being created. In a tightly embedded system, use of resources (RAM) can
become critical so it becomes important to only allocate the minimal that is
needed for each task. With the current implementation, there are only two ways
to track what is being created. Either by counting and hope they get called in
the same order or by some global variable. Both of these approaches add
unwanted dependencies between modules.
The addition of the name is mostly for debugging purposes. By passing the
name on to the OS, we can easily list and separate process problems.
New fuction would look something like:
sys_thread_t sys_thread_new_ex( char* name, void (* thread)(void *arg), void
*arg, int stacksize, int prio);
The default values would be defined in opt.h and would be similar to others.
For example:
#ifndef TCPIP_THREAD_NAME
#define TCPIP_THREAD_NAME "tcpip_thread"
#endif
#ifndef TCPIP_THREAD_STACKSIZE
#define TCPIP_THREAD_STACKSIZE 10000
#endif
And the old function would be defined as:
#define sys_thread_new(thread, arg, pri) sys_thread_new_ex( NULL, thread,
arg, 0, prio)
The three exsting calls are:
sys_thread_new(tcpip_thread, NULL, TCPIP_THREAD_PRIO);
sys_thread_new(slipif_loop, netif, SLIPIF_THREAD_PRIO);
sys_thread_new(pppMain, (void*)pd, PPP_THREAD_PRIO);
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?7252>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), Bill Florac, 2007/08/28
- [lwip-devel] [task #7252] Create sys_thread_new_ex(),
Bill Florac <=
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), David Empson, 2007/08/28
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), Frédéric Bernon, 2007/08/29
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), Kieran Mansley, 2007/08/29
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), Kieran Mansley, 2007/08/29
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), Jared Grubb, 2007/08/29
- [lwip-devel] [task #7252] Create sys_thread_new_ex(), Jared Grubb, 2007/08/29