util/co-shared-resource: Remove unused co_try_get_from_shres
PATCH 1/1 util/co-shared-resource: Remove unused co_try_get_from_shres
From: "Dr. David Alan Gilbert" <[email protected]>
co_try_get_from_shres hasn't been used since it was added in
55fa54a789 ("co-shared-resource: protect with a mutex")
(Everyone uses the _locked version)
Remove it.
Signed-off-by Dr. David Alan Gilbert <[email protected]>
--- include/qemu/co-shared-resource.h | 7 ------- util/qemu-co-shared-resource.c | 6 ------ 2 files changed, 13 deletions(-)
include/qemu/co-shared-resource.h +0 -7
@@ -44,13 +44,6 @@ SharedResource *shres_create(uint64_t total);*/ void shres_destroy (SharedResource *s); -/* -* Try to allocate an amount of @n. Return true on success, and false -* if there is too little left of the collective resource to fulfill -* the request. -*/ -bool co_try_get_from_shres (SharedResource *s,uint64_t n); -/* * Allocate an amount of @n, and, if necessary, yield until * that becomes possible.
util/qemu-co-shared-resource.c +0 -6
@@ -66,12 +66,6 @@ static bool co_try_get_from_shres_locked(SharedResource *s, uint64_t n)return false; } -bool co_try_get_from_shres (SharedResource *s,uint64_t n) -{ -QEMU_LOCK_GUARD (&s->lock); -return co_try_get_from_shres_locked (s, n); -} - void coroutine_fn co_get_from_shres(SharedResource *s, uint64_t n) {assert (n <= s->total);
Signature · 1 line
2.46.0
Vladimir Sementsov-Ogievskiy
AppliedQuoted 9 lines · On 18.09.24 15:42, [email protected] wrote:
From: "Dr. David Alan Gilbert"<[email protected]>
co_try_get_from_shreshasn't been used since it was added in
55fa54a789("co-shared-resource: protect with a mutex")(Everyone uses the
_lockedversion)
Remove it.Signed-off-by Dr. David Alan Gilbert<[email protected]>
Thanks, applied to my block branch.
Signature · 2 lines
Best regards, Vladimir