See responses in-line
Joel On Jun 24, 2016, at 09:31 PM, lampo <[email protected]> wrote: thanks a lot. now I use *recv*, *send*, *close* apis in the same thread per one socket, that means each client socket occupy a new thread, and each of them calles *select*, *recv*, *send*, *close* . I'm wondering is this usage still so called multi-threaded environment ? can I just neglect SYS_ARCH_PROTECT here? for using SYS_ARCH_PROTECT , there's really some bad thing happening inside the whole schedule system. And it seems OK with 3 days of running without SYS_ARCH_PROTECT . I would say no. The SYS_ARCH_PROTECT isn't just protecting against your application threads, but also the LwIP core thread and your application If your port can't support SYS_ARCH_PROTECT in any of its forms (disable/enable interrupts, semaphore, mutex) then I would really question how safe that OS/platform is to use with LwIP in multi-threading mode. How are the other SYS arch constructs (mbox, mutex, sem) working? I just want to confirm the usage of SYS_ARCH_PROTECT, or where may lead to data consistency problems due to not using SYS_ARCH_PROTECT mechanism, when programing in this *specific multi-threaded environment * If you want more confidence that your usage is safe, I think you're going to have to do analysis of the code to confirm no sections (that you are using) are unprotected. I wouldn't want to perform that kind of analysis and would correctly implement SYS_ARCH_PROTECT Appreciate for your advice! -- View this message in context: http://lwip.100.n7.nabble.com/LwIP-multithread-select-mode-problems-tp26561p26584.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
