projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8b3324
)
fifo8: replace fifo8_pop_bufptr() with fifo8_peekpop_bufptr() in fifo8_pop_buf()
author
Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk>
Wed, 28 Aug 2024 12:22:53 +0000
(13:22 +0100)
committer
Philippe Mathieu-Daudé
<philmd@linaro.org>
Fri, 13 Sep 2024 18:11:13 +0000
(20:11 +0200)
The upcoming peek functionality will require passing a non-zero
value to fifo8_peekpop_bufptr().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Octavian Purdila <tavip@google.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <
20240828122258
.928947-5-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
util/fifo8.c
patch
|
blob
|
history
diff --git
a/util/fifo8.c
b/util/fifo8.c
index 62d6430b05d4005c57c0ea099c3a773c1fafb0b0..efe0117b1fd04a788fccb8fe1b5648f0bab3db74 100644
(file)
--- a/
util/fifo8.c
+++ b/
util/fifo8.c
@@
-116,7
+116,7
@@
uint32_t fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, uint32_t destlen)
}
len = destlen;
- buf = fifo8_p
op_bufptr(fifo, len, &n1
);
+ buf = fifo8_p
eekpop_bufptr(fifo, len, 0, &n1, true
);
if (dest) {
memcpy(dest, buf, n1);
}
@@
-125,7
+125,7
@@
uint32_t fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, uint32_t destlen)
len -= n1;
len = MIN(len, fifo8_num_used(fifo));
if (len) {
- buf = fifo8_p
op_bufptr(fifo, len, &n2
);
+ buf = fifo8_p
eekpop_bufptr(fifo, len, 0, &n2, true
);
if (dest) {
memcpy(&dest[n1], buf, n2);
}