1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2023 Red Hat
6 #ifndef VDO_THREAD_REGISTRY_H
7 #define VDO_THREAD_REGISTRY_H
9 #include <linux/list.h>
10 #include <linux/spinlock.h>
12 struct thread_registry {
13 struct list_head links;
17 struct registered_thread {
18 struct list_head links;
20 struct task_struct *task;
23 void vdo_initialize_thread_registry(struct thread_registry *registry);
25 void vdo_register_thread(struct thread_registry *registry,
26 struct registered_thread *new_thread, const void *pointer);
28 void vdo_unregister_thread(struct thread_registry *registry);
30 const void *vdo_lookup_thread(struct thread_registry *registry);
32 #endif /* VDO_THREAD_REGISTRY_H */