2023-11-17 00:47:35 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/*
|
|
|
|
* Copyright 2023 Red Hat
|
|
|
|
*/
|
|
|
|
|
2024-02-09 16:10:03 +00:00
|
|
|
#ifndef THREAD_UTILS_H
|
|
|
|
#define THREAD_UTILS_H
|
2023-11-17 00:47:35 +00:00
|
|
|
|
|
|
|
#include <linux/atomic.h>
|
|
|
|
|
2024-02-09 18:08:09 +00:00
|
|
|
/* Thread and synchronization utilities */
|
2023-11-17 00:47:35 +00:00
|
|
|
|
|
|
|
struct thread;
|
|
|
|
|
2024-03-01 23:29:05 +00:00
|
|
|
void vdo_initialize_threads_mutex(void);
|
2024-02-09 18:08:09 +00:00
|
|
|
int __must_check vdo_create_thread(void (*thread_function)(void *), void *thread_data,
|
2023-11-17 00:47:35 +00:00
|
|
|
const char *name, struct thread **new_thread);
|
2024-02-09 18:08:09 +00:00
|
|
|
void vdo_join_threads(struct thread *thread);
|
2023-11-17 00:47:35 +00:00
|
|
|
|
|
|
|
#endif /* UDS_THREADS_H */
|