[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #20842] unix sys_arch_protect faulty
From: |
Jonathan Larmour |
Subject: |
[lwip-devel] [bug #20842] unix sys_arch_protect faulty |
Date: |
Tue, 21 Aug 2007 14:11:28 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12 |
Follow-up Comment #5, bug #20842 (project lwip):
I agree with Frederic. There's nothing that says SYS_ARCH_PROTECT should only
protect that one critical region. For example, it's used to protect memp
metadata in both memp_alloc and memp_free. Different critical regions of code,
but they both have to be protected because it's the data that's being
protected, not the critical region.
Yes mutexes might help, although not all systems have recursive mutexes. I'm
interested to see that recursive mutexes are in SUS2. They are not in POSIX
1003.1c-1995, so they aren't that portable in practice.
The problem with mutexes in some places like the memp code is that, for
example, you may be doing a pbuf_alloc(PBUF_POOL,... from an interrupt context
(due to a new incoming packet), and in an interrupt context you cannot block.
Which means you can't block on a mutex.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?20842>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Thomas Taranowski, 2007/08/20
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Jonathan Larmour, 2007/08/20
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Thomas Taranowski, 2007/08/20
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Frédéric Bernon, 2007/08/21
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Frédéric Bernon, 2007/08/21
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty,
Jonathan Larmour <=
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Frédéric Bernon, 2007/08/21
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty, Thomas Taranowski, 2007/08/21
- [lwip-devel] [bug #20842] unix sys_arch_protect faulty - deferred to task 7212, Thomas Taranowski, 2007/08/21