spi_flush_queue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spi_flush_queue β€” the "okay bestie, everybody out of the queue" function

So this is a page from the Kernel API Manual (the (9) section, aka the kernel-internals girlies). Sit down, hydrate, and let's talk about flushing a queue. 🫢


✨ NAME ✨

spi_flush_queue β€” send all pending messages in the queue, from the caller's own context. Yes, your context. You're the one doing it. Main character energy fr. πŸ’…


🌸 SYNOPSIS 🌸

void spi_flush_queue (struct spi_controller *ctlr );

Note the void β€” this diva returns literally nothing. No errors, no status code, no little treat for you at the end. It just does the thing. 😌


πŸŽ€ ARGUMENTS πŸŽ€

  • ctlr β€” the controller you want to process the queue for. That's it, that's the whole argument list. One (1) pointer, iconic.

πŸ’– DESCRIPTION πŸ’–

Okay so picture this: you've got pending messages just chilling in the queue, waiting their turn, and you need them actually sent before you move on to the next thing. That's the moment you call spi_flush_queue. Use it whenever you want to make sure all those pending messages have gone out before you do something else. No cap. ✨

The spi-mem code is obsessed with this one β€” it uses it to make sure SPI memory operations don't preempt the regular SPI transfers that got queued up before the spi-mem operation. Basically it's the "excuse me, the line starts back there" of the SPI subsystem. 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

All of these live in the kernel file ./drivers/spi/spi.c, and honestly it's giving full cinematic universe. 🌈 Go read them, they're all right here, nothing skipped, nothing dropped:

Bestie heads-up: the original page really does point you at ./drivers/spi/spi.c as the kernel file for this whole friend group, and it lists ./drivers/spi as the source. That's the lore. πŸ“

Okay that's the whole page, mwah. πŸ’œ This lil' number comes to you straight out of ./drivers/spi, dated October 2026 β€” so like, future-dated and still relevant, we love a timeless queen. Stay flushed, stay queued, see you in the next (9) page! πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from