Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2008 03:24:28 -0800
From:      "Garrett Cooper" <yanefbsd@gmail.com>
To:        "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
Cc:        "current@freebsd.org" <current@freebsd.org>
Subject:   Re: RFC: small syscons and kbd patch
Message-ID:  <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com>
In-Reply-To: <bb4a86c70812021701i621fdcfjb6a58a7f5cf781d5@mail.gmail.com>
References:  <bb4a86c70812021701i621fdcfjb6a58a7f5cf781d5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 2, 2008 at 5:01 PM, Maksim Yevmenkin
<maksim.yevmenkin@gmail.com> wrote:
> Dear Hackers,
>
> can someone please review the attached small patch for syscons and
> kbd? it should be a no-op mostly. the patch basically does
>
> 1) removes bogus layering in syscons, i.e. basically removes sccngetch();
> 2) implements advisory lock for kbd (based on atomic(9));
> 3) implements new POLLED flag for kbd;
>
> this is a part of a plan to fix keyboard access races in syscons.
>
> thanks,
> max

Max,
     Why are you double and triple negating on this line?

+	return (atomic_cmpset_acq_int(&kbd->kb_locked, !!!on, !!on));

-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d6fde3d0812040324y3bf0901cy1f4a6d961362c314>