[haiku-commits] Change in haiku[master]: virtio: Rework queue_dequeue to return a boolean.

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 1 Sep 2019 21:55:39 +0000

From Michael Lotz <mmlr@xxxxxxxx>:

Michael Lotz has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/1814 ;)


Change subject: virtio: Rework queue_dequeue to return a boolean.
......................................................................

virtio: Rework queue_dequeue to return a boolean.

It previously returned the cookie directly, which made it impossible
to distinguish between a NULL cookie and the function not having
anything to dequeue. This lead to some code setting a cookie that was
not actually used.

Return the dequeue status as a boolean and provide the cookie with an
optionally handed in pointer instead and adjust all users.
---
M headers/private/virtio/virtio.h
M src/add-ons/kernel/bus_managers/virtio/VirtioBalloonDevice.cpp
M src/add-ons/kernel/bus_managers/virtio/VirtioModule.cpp
M src/add-ons/kernel/bus_managers/virtio/VirtioPrivate.h
M src/add-ons/kernel/bus_managers/virtio/VirtioQueue.cpp
M src/add-ons/kernel/busses/random/VirtioRNGDevice.cpp
M src/add-ons/kernel/busses/scsi/virtio/VirtioSCSIController.cpp
M src/add-ons/kernel/drivers/disk/virtual/virtio_block/virtio_block.cpp
M src/add-ons/kernel/drivers/network/virtio/virtio_net.cpp
9 files changed, 38 insertions(+), 45 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/14/1814/1
--
To view, visit https://review.haiku-os.org/c/haiku/+/1814
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Iaac1726ac4bc7ae42bb96b8f0915852b6def5822
Gerrit-Change-Number: 1814
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Lotz <mmlr@xxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: virtio: Rework queue_dequeue to return a boolean. - Gerrit