LWN.net Logo

Debugging misconverted semaphores

Debugging misconverted semaphores

Posted Dec 15, 2005 18:45 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246)
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. :-)


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds