summaryrefslogtreecommitdiff
path: root/drivers/md/dm-vdo/thread-utils.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-02-09 22:06:00 +0300
committerMike Snitzer <snitzer@kernel.org>2024-03-01 17:25:58 +0300
commit7f2e494ddda6d66214902c31091cc39b30a9b1f6 (patch)
tree88f9c19e042106c76760fbdfbe4492b29dfef309 /drivers/md/dm-vdo/thread-utils.h
parent877f36b76485d1e0dab5a9de8a7175c66cc791e3 (diff)
downloadlinux-7f2e494ddda6d66214902c31091cc39b30a9b1f6.tar.xz
dm vdo thread-utils: push uds_*_cond interface down to indexer
Only used by indexer components. Also return void from uds_init_cond(), remove uds_destroy_cond(), and fix up all callers. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
Diffstat (limited to 'drivers/md/dm-vdo/thread-utils.h')
-rw-r--r--drivers/md/dm-vdo/thread-utils.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/md/dm-vdo/thread-utils.h b/drivers/md/dm-vdo/thread-utils.h
index c7a5d2d948a4..fb71f8f1b46e 100644
--- a/drivers/md/dm-vdo/thread-utils.h
+++ b/drivers/md/dm-vdo/thread-utils.h
@@ -11,16 +11,11 @@
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/semaphore.h>
-#include <linux/wait.h>
#include "errors.h"
/* Thread and synchronization utilities for UDS */
-struct cond_var {
- wait_queue_head_t wait_queue;
-};
-
struct thread;
@@ -31,30 +26,8 @@ void uds_perform_once(atomic_t *once_state, void (*function) (void));
int uds_join_threads(struct thread *thread);
-static inline int __must_check uds_init_cond(struct cond_var *cv)
-{
- init_waitqueue_head(&cv->wait_queue);
- return UDS_SUCCESS;
-}
-
-static inline void uds_signal_cond(struct cond_var *cv)
-{
- wake_up(&cv->wait_queue);
-}
-
-static inline void uds_broadcast_cond(struct cond_var *cv)
-{
- wake_up_all(&cv->wait_queue);
-}
-
-void uds_wait_cond(struct cond_var *cv, struct mutex *mutex);
-
/* FIXME: all below wrappers should be removed! */
-static inline void uds_destroy_cond(struct cond_var *cv)
-{
-}
-
static inline int __must_check uds_init_mutex(struct mutex *mutex)
{
mutex_init(mutex);
@@ -76,5 +49,4 @@ static inline void uds_unlock_mutex(struct mutex *mutex)
mutex_unlock(mutex);
}
-
#endif /* UDS_THREADS_H */