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? Do you have any specific places in mind where you want to use this functionality? That might help me understand. Thanks, Ben _______________________________________________ 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"