Date: Fri, 23 Jan 2015 10:24:18 -0500 From: Ed Maste <emaste@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Ryan Stone <rysto32@gmail.com> Subject: Re: Sleeping thread held mutex in vm_pageout_oom() Message-ID: <CAPyFy2AUdAWM%2BM0kgyH-NN64eVLRGnYA9qNFkca4c80LQW8Skg@mail.gmail.com> In-Reply-To: <20150123083654.GB42409@kib.kiev.ua> References: <CAFMmRNxz252HMWWBmRf=Z69zh2_w9cD5e1AZGeizyagKezm2Hw@mail.gmail.com> <20150120083212.GC42409@kib.kiev.ua> <CAFMmRNz6Dof%2B95zyekUFEbmcqeFSqXr96Y7BUZpqJ9z0XoWVOA@mail.gmail.com> <20150122083514.GU42409@kib.kiev.ua> <CAFMmRNziuN_jWyeNjdcB8yzM6uVM8_BO_h0U1Gphn%2B13E-7JcA@mail.gmail.com> <20150123083654.GB42409@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23 January 2015 at 03:36, Konstantin Belousov <kostikbel@gmail.com> wrote: > On Thu, Jan 22, 2015 at 07:30:19PM -0500, Ryan Stone wrote: >> Other than the redundant braces on the else below, this looks good. I >> tested it today and saw no further problems. > The (possibly implicit) style rule is to have {} around both branches > in if () when one branch requires {}. Unfortunately style(9) presents the opposite case as an example: Closing and opening braces go on the same line as the else. Braces that are not necessary may be left out. if (test) stmt; else if (bar) { stmt; stmt; } else stmt; It does say that the braces "may be" left out though, and I much prefer the guideline as you state it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2AUdAWM%2BM0kgyH-NN64eVLRGnYA9qNFkca4c80LQW8Skg>