diff options
| author | 2026-06-10 17:45:31 +0200 | |
|---|---|---|
| committer | 2026-06-11 09:34:09 +0200 | |
| commit | dcca9b6064c33c84fbeb9f09814178a206321249 (patch) | |
| tree | 728716586caf1d2fd552c616211638d97b0a804b /tools/lib/python/kdoc/python_version.py | |
| parent | ALSA: 6fire: Use common error handling code in usb6fire_control_init() (diff) | |
ALSA: Add simple refcount helper functions
There are many open-code to manage the same pattern for refcount +
wakeup sync at closing. Let's provide the common helper functions to
replace the open-code.
- The recount is kept in struct snd_refcount, where it's initialized
by snd_refcount_init().
- The user can simply reference or unreference via snd_refcount_get()
and snd_refcount_put() functions
- The user can wait for the all usages gone by snd_refcount_sync()
Note that here we use atomic_t instead of refcount_t since the current
users allow reusing the refcount after sync again. The design of
refcount_t prevents exactly this behavior, so it doesn't fit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260610154538.51076-2-tiwai@suse.de
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
