projects/linux·blob master · refs

28 lines · 728 B

1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _TIME_NAMESPACE_INTERNAL_H
3#define _TIME_NAMESPACE_INTERNAL_H
4
5#include <linux/mutex.h>
6
7struct time_namespace;
8
9/*
10 * Protects possibly multiple offsets writers racing each other
11 * and tasks entering the namespace.
12 */
13extern struct mutex timens_offset_lock;
14
15#ifdef CONFIG_TIME_NS_VDSO
16int timens_vdso_alloc_vvar_page(struct time_namespace *ns);
17void timens_vdso_free_vvar_page(struct time_namespace *ns);
18#else /* !CONFIG_TIME_NS_VDSO */
19static inline int timens_vdso_alloc_vvar_page(struct time_namespace *ns)
20{
21 return 0;
22}
23static inline void timens_vdso_free_vvar_page(struct time_namespace *ns)
24{
25}
26#endif /* CONFIG_TIME_NS_VDSO */
27
28#endif /* _TIME_NAMESPACE_INTERNAL_H */