RFC: small syscons and kbd patch
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Thu Dec 4 03:52:31 PST 2008
Garrett, good day.
Thu, Dec 04, 2008 at 03:24:28AM -0800, Garrett Cooper wrote:
> On Tue, Dec 2, 2008 at 5:01 PM, Maksim Yevmenkin
> Why are you double and triple negating on this line?
> + return (atomic_cmpset_acq_int(&kbd->kb_locked, !!!on, !!on));
Double negation is easy -- !!N = 1 for int N != 0, so it is the way to
turn N != 0 to one. Triple negation? I am out of guesses, because it
seems redundant to me: !0 = 1, !5 = 0, so adding another two negations
is seem to be worthless.
--
Eygene
_ ___ _.--. #
\`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard
/ ' ` , __.--' # to read the on-line manual
)/' _/ \ `-_, / # while single-stepping the kernel.
`-'" `"\_ ,_.-;_.-\_ ', fsc/as #
_.-'_./ {_.' ; / # -- FreeBSD Developers handbook
{_.-``-' {_/ #
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20081204/ce23eb94/attachment.pgp
More information about the freebsd-current
mailing list