[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-members] question about SYS_ARCH_ defines
From: |
leon . woestenberg |
Subject: |
Re: [lwip-members] question about SYS_ARCH_ defines |
Date: |
Tue, 18 Feb 2003 16:04:01 +0100 |
Hello,
my thoughts on protection are as follows:
Do not implement locking in the lwIP core files, because
we simply cannot implement all the different protection
schemes used by different operating systems.
Implement locking in the higher layers.
The benefit is that lwIP is not cluttered with different protection
schemes.
The drawback is that locking critical sections occurs at a more coarse
grained level.
The benefit is that we do not have deadlock (are your mutexes recursive??).
For example, uCOS does not support recursive mutexes.
If a task enters a critical section, then calls another function entering
the
same critical section (for example pbuf management), the protection mutex
is not recursed and deadlock occurs.
I would strongly opt for removing all locking primitives/macro's from the
core lwIP API to improve stack maintainability. I think this would break
a lot of stuff out there though...
Regards,
Leon Woestenberg