lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] threads question


From: Tim Newsham
Subject: [lwip-users] [lwip] threads question
Date: Thu, 09 Jan 2003 00:41:37 -0000

Hi,
   I'm porting lwIP to a system and I have some questions reguarding
threads.  I will have a seperate thread handling the timers
(tight loop with sleeps and calls to the arp and tcp timer functions),
a seperate thread doing ethernet reads (blocking read on an ethernet
device) and a seperate thread waiting for user requests and processing
them through the IP stack (ie. create tcb, bind to port, establish
connection..).

My question is about locking.  I see that there is some locking
built in to the system, but it seems like most of this has to do
with the API library.  I will not be using the API library.  Looking
over the code, at fast glance it doesnt seem like I will be safe
to have the reader thread call into ip_input at the same time
as another thread may be calling into raw api functions to setup
tcbs.

   - Is lwip designed to be able to handle multiple threads in
     this manner (at first glance it doesnt seem to).
   - should I just have a big lock that all threads grab before
     calling into lwip functions?
   - should I just define away the sys_sem_t operations as nops
     when using the big lock?

Tim N.

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]