[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt cont
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe |
Date: |
Fri, 26 Oct 2007 15:51:32 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8 |
Follow-up Comment #5, bug #21433 (project lwip):
Personally, I don't know what to prefer here.
- Using SYS_ARCH_PROTECT to walk the heap seems like a bad idea to me, since
_my_ heap is pretty big, this locks interrupts for too long.
- Using the chained list we have to implement many new functions (lock/unlock
a resource for NO_SYS=1, sys_sem_tryget for NO_SYS=0), the code is rather
slower (but the mem_* functions are slow, anyway) _and_ it adds unused code
for people that don't need it.
- tcpip_callback makes the stack dependent on the API part and we need to
malloca a memp-message when we want to free memory (seems a little big awkward
to me).
It _does_ work with NO_SYS=1, though: you only have to implement a function
called tcpip_callback that puts function calls and their arguments into a
linked list and process that list when back in normal context (poll it like
the rest of the stack). Of course, that would also be code not needed by most
of the people.
The reason I prefer the list (like in my patch) is it just works (provided we
have the necessary functions and the port is correct) independent of the
context mem_free() is called from, which makes lwIP easier to implement.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?21433>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, Simon Goldschmidt, 2007/10/25
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, Simon Goldschmidt, 2007/10/25
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, Jonathan Larmour, 2007/10/25
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, EVS Hardware Dpt, 2007/10/26
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, EVS Hardware Dpt, 2007/10/26
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe,
Simon Goldschmidt <=
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, Frédéric Bernon, 2007/10/28
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, EVS Hardware Dpt, 2007/10/29
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, EVS Hardware Dpt, 2007/10/30
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, Jonathan Larmour, 2007/10/30
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, EVS Hardware Dpt, 2007/10/30
- [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe, Jonathan Larmour, 2007/10/30