From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 2/2] Enhance sendkey with key hold time
Date: Wed, 04 Jun 2008 20:15:36 +0200 [thread overview]
Message-ID: <4846DBC8.1090301@web.de> (raw)
In-Reply-To: <20080604132556.GA28895@mx.loc>
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
Bernhard Fischer wrote:
> On Wed, Jun 04, 2008 at 12:16:48PM +0200, andrzej zaborowski wrote:
>> On 22/05/2008, Jan Kiszka <jan.kiszka@web.de> wrote:
>
>>> +static void release_keys(void *opaque)
>>> +{
>>> + int keycode;
>>> +
>>> + while (nb_pending_keycodes > 0) {
>
> Perhaps just doing a post decrement on the nb_pending would be cleaner.
I prefer a separate statement for this but...
>
>>> + keycode = keycodes[nb_pending_keycodes-1];
>>> + if (keycode & 0x80)
>>> + kbd_put_keycode(0xe0);
>>> + kbd_put_keycode(keycode | 0x80);
>>> + nb_pending_keycodes--;
>>> + }
I agree that code reordering can save us the "-1".
Thanks,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2008-06-04 18:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 13:17 [Qemu-devel] [PATCH 2/2] Enhance sendkey with key hold time Jan Kiszka
2008-06-04 10:16 ` andrzej zaborowski
2008-06-04 13:25 ` Bernhard Fischer
2008-06-04 18:15 ` Jan Kiszka [this message]
2008-06-04 18:13 ` [Qemu-devel] " Jan Kiszka
2008-06-04 18:20 ` [Qemu-devel] [PATCH] Enhance sendkey with key hold time - v2 Jan Kiszka
2008-06-04 20:49 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4846DBC8.1090301@web.de \
--to=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).