svn commit: r275751 - in head: share/man/man9 sys/kern sys/sys
Chagin Dmitry
dchagin at freebsd.org
Sun Dec 14 10:58:55 UTC 2014
On Sat, Dec 13, 2014 at 10:06:06PM -0500, Benjamin Kaduk wrote:
> On Sat, 13 Dec 2014, Chagin Dmitry wrote:
>
> > > 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.
>
> Yes, I have run into that assertion a few times; it helped me fix bugs in
> my code.
>
> > 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
>
> I guess I'm still confused as why skipping the zeroing is useful.
> Wouldn't it be a good practice to always zero?
useful? no
>
>
> Do you have any specific places in mind where you want to use this
> functionality? That might help me understand.
>
sure, next commit
--
Have fun!
chd
More information about the svn-src-head
mailing list