Date: Sat, 13 Dec 2014 22:06:06 -0500 (EST) From: Benjamin Kaduk <bjk@freebsd.org> To: Chagin Dmitry <dchagin@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r275751 - in head: share/man/man9 sys/kern sys/sys Message-ID: <alpine.GSO.1.10.1412132204280.23489@multics.mit.edu> In-Reply-To: <20141213213111.GA2070@dchagin.static.corbina.net> References: <201412132100.sBDL0BvR094009@svn.freebsd.org> <CAJ5_RoCnMNEEa86besbhfKTxf-wOhwBy%2BjktLB7%2Bod=zkSQ6Aw@mail.gmail.com> <20141213213111.GA2070@dchagin.static.corbina.net>
index | next in thread | previous in thread | raw e-mail
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, Benhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1412132204280.23489>
