On Wed, Jan 28, 2009 at 6:50 PM, Jonathan Larmour <[email protected]>wrote:
> DownyTif wrote: > >> I do have some more questions on this topic... I decided to test the speed >> improvements using the RAW API. This API allows me to use only one thread >> to >> do whatever I want instead of two threads using the sequential API because >> the "recv" is blocking and I need to send data in the idle time. >> >> 1- I just read from the Wiki that the RAW API can only be used by the main >> thread?? In my project, I need the main thread to call >> "vTaskStartScheduler()" to run FreeRTOS for multithreading, which never >> returns. So, I can't use my main thread to manage the RAW API, but I can >> call "tcp_new", "tcp_bind", "tcp_listen" and "tcp_accept" before. Is that >> sufficient? >> > > It just means a single thread. It doesn't have to be the thread used for > main(). What really matters is that nothing can call into lwIP core code > from more than one context at the same time, whether it be another thread, > interrupt handler, etc. Alright, understood. > > > 2- What do I need to call to use/init the RAW API? For the sequential, I >> was >> using sys_init(), mem_init(), memp_init(), pbuf_init(), netif_init(), >> tcpip_init(EthernetConfigInterface, NULL). I'm not sure if I still need >> those... or if I'm missing something. >> > > What version of lwIP are you using? For 1.3.0, you can use lwip_init() > instead for much of it, except for tcpip_init (which is specific to when > using the sequential or sockets APIs). See src/core/init.c. I would have > hoped it would be in the wiki, but from a look around I'm not sure it's > there yet. > > Actually it should also be described in doc/rawapi.txt in the source > distribution. Patches welcome from anyone who's tried it recently! > I didn't know about this text file, thanks. I'm using lwip 1.2.0 for Atmel AVR32 UC3 included in the framework they provided. Is there significant improvements in 1.3.0? Cause I don't know if they ported it or just used it plain as downloaded... And I surely don't have time to port it right now. > > > 3- >> I haven't found it, so I think it would be good to have a little resume of >> what are the #defines needed by all the API. For example, if I want to use >> the RAW API, I must absolutly define some values in the lwipopts.h file. >> Personally, I'm not sure I have everything configured ok.. >> > > Most of the defines are still relevant when using the raw API. And the ones > that aren't relevant are ignored. After all, the sequential API is > essentially just a user of the raw API itself. > Understood also. I was setting to 0 what I was presuming to not be used by the API. I'll make a .h usable both by the raw and sequential API to ease my testings. > > > Jifl > -- > eCosCentric Limited > http://www.eCosCentric.com/<http://www.ecoscentric.com/> The eCos experts > Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 > Registered in England and Wales: Reg No 4422071. > ------["The best things in life aren't things."]------ Opinions==mine > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users >
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
