svn commit: r275751 - in head: share/man/man9 sys/kern sys/sys

Chagin Dmitry dchagin at freebsd.org
Sat Dec 13 21:31:43 UTC 2014


On Sat, Dec 13, 2014 at 04:03:47PM -0500, Benjamin Kaduk wrote:
> On Sat, Dec 13, 2014 at 4:00 PM, Dmitry Chagin <dchagin at freebsd.org> wrote:
> >
> > Author: dchagin
> > Date: Sat Dec 13 21:00:10 2014
> > New Revision: 275751
> > URL: https://svnweb.freebsd.org/changeset/base/275751
> >
> > Log:
> >   Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9).
> >   A _NEW flag passed to _init_flags() to avoid check for double-init.
> >
> >
> Can you please say a bit more about why this is desired and what it will be
> used for?
> 
If the kernel has been compiled with INVARIANTS _init() will assert that the
lock has not been initialized multiple times. _NEW flag is needed to skip this.
as _init() does expect you to zero lock first.
it should be used carefully, when you are sure its safe,
to avoid bzero'ing lock struct. ugh

-- 
Have fun!
chd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20141214/7c5bbfce/attachment.sig>


More information about the svn-src-head mailing list