On Mon, 12 Mar 2007, Julian Elischer wrote:
John Baldwin wrote:
Will try to pass 'lock' to three different functions, at least 2 of which
will trigger compile errors. :) The kernel won't choose which one to run
until runtime though. The key is that I want a compile error, not a
panic(). :)
I've been asking for awhile that for example spin and sleep mutexes should
be different types so that we could catch those problems at compile time.
The idea of a locking(9) has been kicked around for a while, and its time has
definitely come. It would summarize the properties and cross reference the
man pages of the various primitives, and suggest a preference and strategy for
using them in new code vs. existing code, etc. Distinguishing dimensions
would include things like whether it is sleepable, supports priority
propagation, can be acquired in interrupt context (a result of the prior two
properties), whether it is fair, etc, etc. And include stern warnings about
not using lockmgr in new code :-).
Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"