public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/8] membuff: Add tests and update to support a flag for empty/full
@ 2024-10-18  3:00 Simon Glass
  2024-10-18  3:00 ` [PATCH 1/8] membuff: Rename functions to have membuf_ prefix Simon Glass
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Simon Glass @ 2024-10-18  3:00 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Rasmus Villemoes, Simon Glass, Alexander Sverdlin, Caleb Connolly,
	Francis Laniel, Heinrich Schuchardt, Ilias Apalodimas,
	Ion Agorria, Jerome Forissier, Marek Vasut, Martyn Welch,
	Mattijs Korpershoek, Neil Armstrong, Oliver Gaskell,
	Patrice Chotard, Peter Robinson, Quentin Schulz, Raymond Mao,
	Robert Marko, Sam Protsenko, Sughosh Ganu, Sumit Garg,
	Svyatoslav Ryhel, Tom Rini

The membuff implementation curently has no tests. It also assumes that
head and tail can never correspond unless the buffer is empty.

This series provides a compile-time flag to support a 'full' flag. It
also adds some tests of the main routines.

The data structure is also renamed to membuf which fits better with
U-Boot.

There may be some cases in the code which could be optimised a little,
but the implementation is functional.


Simon Glass (8):
  membuff: Rename functions to have membuf_ prefix
  membuff: Rename the files to membuf
  membuf: Rename struct
  membuf: Include stdbool
  membuf: Correct implementation of membuf_dispose()
  membuf: Add some tests
  membuf: Minor code-style improvements
  membuf: Support a flag for being full

 MAINTAINERS                       |   7 +
 arch/sandbox/include/asm/serial.h |   2 +-
 boot/bootmeth_extlinux.c          |   8 +-
 common/console.c                  |  32 ++--
 drivers/serial/sandbox.c          |  10 +-
 drivers/usb/emul/sandbox_keyb.c   |   8 +-
 include/asm-generic/global_data.h |   6 +-
 include/{membuff.h => membuf.h}   |  98 ++++++------
 lib/Makefile                      |   2 +-
 lib/{membuff.c => membuf.c}       | 134 ++++++++++------
 test/lib/Makefile                 |   1 +
 test/lib/membuf.c                 | 244 ++++++++++++++++++++++++++++++
 12 files changed, 427 insertions(+), 125 deletions(-)
 rename include/{membuff.h => membuf.h} (67%)
 rename lib/{membuff.c => membuf.c} (69%)
 create mode 100644 test/lib/membuf.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-03-06 16:14 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18  3:00 [PATCH 0/8] membuff: Add tests and update to support a flag for empty/full Simon Glass
2024-10-18  3:00 ` [PATCH 1/8] membuff: Rename functions to have membuf_ prefix Simon Glass
2025-03-04 15:37   ` Simon Glass
2024-10-18  3:00 ` [PATCH 2/8] membuff: Rename the files to membuf Simon Glass
2024-10-18  3:00 ` [PATCH 3/8] membuf: Rename struct Simon Glass
2025-03-04 15:37   ` Simon Glass
2024-10-18  3:00 ` [PATCH 4/8] membuf: Include stdbool Simon Glass
2025-03-04 15:37   ` Simon Glass
2024-10-18  3:00 ` [PATCH 5/8] membuf: Correct implementation of membuf_dispose() Simon Glass
2025-03-04 15:37   ` Simon Glass
2024-10-18  3:00 ` [PATCH 6/8] membuf: Add some tests Simon Glass
2025-03-04 15:37   ` Simon Glass
2024-10-18  3:00 ` [PATCH 7/8] membuf: Minor code-style improvements Simon Glass
2025-03-04 15:36   ` Simon Glass
2024-10-18  3:00 ` [PATCH 8/8] membuf: Support a flag for being full Simon Glass
2025-03-04 15:36   ` Simon Glass
2024-10-18  7:05 ` [PATCH 0/8] membuff: Add tests and update to support a flag for empty/full Rasmus Villemoes
2024-10-18 14:55   ` Simon Glass
2025-03-04 15:35     ` Simon Glass
2025-03-04 18:55       ` Rasmus Villemoes
2025-03-05 13:53         ` Simon Glass
2025-03-06 14:21           ` Rasmus Villemoes
2025-03-06 16:07             ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox