Debugging misconverted semaphores
Posted Dec 15, 2005 18:45 UTC (Thu) by jzbiciak
(✭ supporter ✭
Parent article: Reworking the semaphore interface
The debug side of this seems simple enough, at least in theory. To catch semaphores that were incorrectly converted to mutexes, have a compile option that compiles mutexes as semaphores and adds a BUG_ON() call to fault whenever the semaphore count is something other than 0 or 1.
Make the debug mode the default in the first major kernel release, sit back, and watch the popcorn pop. :-)
to post comments)