[En-Nut-Discussion] Feature Request 1572837: mutex API nesting level info

Nathan Moore nategoose at gmail.com
Wed Jul 9 16:31:57 CEST 2008


I believe that what you would actually get back is how many times the
current thread has called NutMutexLock on a particular lock.
The nesting of these mutexes is so that if a function like fputc were to
lock the file's mutex around it's operation, and then fputc was also called
by fprintf which needed to keep all of it's output together it could also
lock the file's mutex without worrying about blocking fputc being blocked or
releasing the lock prematurely.
Returning the count might offer some debugging help (ie "NutMutexUnlock just
returned != 0 at what should have been top level"), but I don't see how
useful it would be in production use.

Nathan



More information about the En-Nut-Discussion mailing list