[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #14780] Add debug helper asserts to ensure threading/
From: |
Douglas |
Subject: |
[lwip-devel] [task #14780] Add debug helper asserts to ensure threading/locking requirements are met |
Date: |
Tue, 2 Jan 2018 05:00:31 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 |
Follow-up Comment #1, task #14780 (project lwip):
Thank you for creating a task for this. Here's a suggestion to start the
discussion:
* Add ASSERT_CORE_LOCKED
* define it empty by default
* Leave it to the arch specific code to implement. Some might want to support
recursive calls so use a counter, others just a binary flag. Some might just
use a static flag that is set after locking and cleared before unlocking. Some
might have an OS function to check if the lock is held and use that.
* Start adding ASSERT_CORE_LOCKED to the api function entry points, and other
critical points that seem to have issues. E.g.
https://savannah.nongnu.org/bugs/index.php?52719 appears to note concerns
about the timer functions.
* Many implementations will probably not enforce this assertion for a start.
But it should help to document what is expected for thread safety.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?14780>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/