summaryrefslogtreecommitdiff
path: root/kernel/time/namespace_internal.h
blob: b37ba179f43b27a1f2cb2c78d649ac9aece83ed9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TIME_NAMESPACE_INTERNAL_H
#define _TIME_NAMESPACE_INTERNAL_H

#include <linux/mutex.h>

struct time_namespace;

/*
 * Protects possibly multiple offsets writers racing each other
 * and tasks entering the namespace.
 */
extern struct mutex timens_offset_lock;

#ifdef CONFIG_TIME_NS_VDSO
int timens_vdso_alloc_vvar_page(struct time_namespace *ns);
void timens_vdso_free_vvar_page(struct time_namespace *ns);
#else /* !CONFIG_TIME_NS_VDSO */
static inline int timens_vdso_alloc_vvar_page(struct time_namespace *ns)
{
	return 0;
}
static inline void timens_vdso_free_vvar_page(struct time_namespace *ns)
{
}
#endif /* CONFIG_TIME_NS_VDSO */

#endif /* _TIME_NAMESPACE_INTERNAL_H */