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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to