drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / md / dm-vdo / thread-registry.h
blobcc6d78312b9eb2975af605b02bd395a81cf64a2d
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2023 Red Hat
4 */
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;
14 spinlock_t lock;
17 struct registered_thread {
18 struct list_head links;
19 const void *pointer;
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 */