Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/miscfs/genfs



On Wed, 12 Mar 2014, Greg Troxel wrote:


Taylor R Campbell <campbell+netbsd-source-changes-d%mumble.net@localhost> 
writes:

   Date: Wed, 12 Mar 2014 16:16:32 +0200
   From: Jukka Ruohonen <jruohonen%iki.fi@localhost>

   On Wed, Mar 12, 2014 at 09:39:23AM +0000, Juergen Hannken-Illjes wrote:
  > Restructure layer_lock() to always lock before testing for dead node.
  > Use ISSET() to test flags, add assertions.

   As I wrote in the manual page, I'd rather see ISSET(3) et. al. disappear,
   i.e. these obscure rather than clarify...

I disagree.  Phrases like `(vp->v_iflag & (VI_XLOCK | VI_CLEAN)) == 0'
make my head's parser stumble -- there are just enough complements to
juggle that it overwhelms my brain registers for the fast path.  I'd
rather read `!ISSET(vp->v_iflag, (VI_XLOCK | VI_CLEAN))'.

FWIW, I agree with Taylor.

Me, too. But I'd rather that we had the equivalent ISCLR() macro, too, to remove another negation/complement.

BTW, why do we have man pages for isset(9)/isclr(9)/setbit(9)/clrbit(9) and then a separate page for SET(9)?

And why do we not have manlinks for ISSET(9) and ISCLR(9)?

And no cross-refs?

:)  :)  :)


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index