snd_pcm_stream_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

Okay so this is snd_pcm_stream_lock from the Kernel API Manual, and its whole job is literally: Lock the PCM stream πŸ”’βœ¨


🌟 SYNOPSIS 🌟

void snd_pcm_stream_lock (struct snd_pcm_substream *substream );

πŸŽ€ ARGUMENTS πŸŽ€

  • substream β€” the PCM substream, bestie. That's the one thing you pass in. 🫢

🌸 DESCRIPTION 🌸

So the way this works: it locks the PCM stream's spinlock or mutex, depending on the nonatomic flag of the given substream. Like, it checks that flag and picks the lock vibe accordingly. πŸ”

It also takes the global link rw lock (or rw sem), too, for avoiding the race with linked streams. No cap, it's doing that extra locking so linked-stream chaos doesn't sneak in. πŸ’…

It's giving β€œdo the lock, move on” energy β€” the synopsis says void, so there's no return value to catch. Periodt. πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./sound/core/pcm_native.c says go check these besties:


source/version: ./sound/core Β· date: October 2026 Β· page: snd_pcm_stream_lock(9) β€” mwah, bye bestie πŸ’–πŸŽ€

πŸ“¦ where this page comes from