lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7213] Add a lwip_init function


From: Simon Goldschmidt
Subject: [lwip-devel] [task #7213] Add a lwip_init function
Date: Tue, 21 Aug 2007 10:38:40 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Follow-up Comment #11, task #7213 (project lwip):

(Frédéric:)
>>> I'm agree that the semaphore stuff could be done in tcpip_init >>> to got
a synchrone call after which we can be sure

(Simon:)
>> I don't agree! I call tcpip_init *before* the OS is started, so
>> I don't have semaphores at that time!

(Frédéric:)
> I'm not sure to understand: as tcpip_init use the OS/sys_arch 
> (sys_mbox_new & sys_thread_new), your OS should be start, or 
> I miss something ? Or semaphores are initialized in a part of 
> your OS, and mbox & thread in another part ?

*_new() is OK but waiting for something is not. Many OSes I used so far split
system initialization into something like OS_Init() and OS_Start(). You can
create items (tasks, semaphores, queues) after OS_Init() is called, but
multithreading is not started until OS_Start() initially invokes the
scheduler. Therefore, waiting for semaphores is not supported before the OS is
running.

I could change lwIP initialization to run after OS_Start(), of course, but as
long as there is no real need to do so, I would like to keep the current
initialization mechanism, which lets the user decide whether to use a
semaphore or a simple callback.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7213>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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