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 {_.-``-' {_/ #
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:38 UTC