qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracke


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracker
Date: Wed, 23 Jan 2019 07:20:33 +0100
User-agent: NeoMutt/20180716

> > +         * the corresponding key-down event wasn't send to the guest,
> 
> s/send/sent/

Fixed.

> > +void kbd_state_lift_all_keys(KbdState *kbd)
> > +{
> > +    int qcode;
> > +
> > +    for (qcode = 0; qcode < Q_KEY_CODE__MAX; qcode++) {
> > +        if (test_bit(qcode, kbd->keys)) {
> > +            kbd_state_key_event(kbd, qcode, false);
> 
> Is there a more efficient iteration through the bitmap when looking for
> the next set bit, or is the map small enough that it doesn't matter?

It isn't that big (a bit over 100 I think), and the function isn't
called often, so performance really shouldn't be a problem here.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]