* [virtio-comment] Suggested improvement for virtq_need_event
@ 2020-07-22 15:28 Olivier Delande
0 siblings, 0 replies; only message in thread
From: Olivier Delande @ 2020-07-22 15:28 UTC (permalink / raw)
To: virtio-comment
In virtio_queue.h, virtq_need_event is implemented as
static inline int virtq_need_event(uint16_t event_idx, uint16_t
new_idx, uint16_t old_idx)
{
return (uint16_t)(new_idx - event_idx - 1) < (uint16_t)(new_idx
- old_idx);
}
. Wouldn't the equivalent
static inline int virtq_need_event(uint16_t event_idx, uint16_t
new_idx, uint16_t old_idx)
{
return (uint16_t)(event_idx - old_idx) < (uint16_t)(new_idx - old_idx);
}
be more readable/intuitive (and possibly slightly faster and more compact)?
Apologies for bikeshedding!
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-22 15:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 15:28 [virtio-comment] Suggested improvement for virtq_need_event Olivier Delande
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.