summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-06-10 17:45:31 +0200
committerTakashi Iwai <tiwai@suse.de>2026-06-11 09:34:09 +0200
commitdcca9b6064c33c84fbeb9f09814178a206321249 (patch)
tree728716586caf1d2fd552c616211638d97b0a804b /include/linux/timerqueue.h
parent03a10859061b7f6939babd3e9b5d5a891a93c836 (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 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions