15dc9cf83SThomas Weißschuh /* SPDX-License-Identifier: GPL-2.0 */ 25dc9cf83SThomas Weißschuh #ifndef _TIME_NAMESPACE_INTERNAL_H 35dc9cf83SThomas Weißschuh #define _TIME_NAMESPACE_INTERNAL_H 45dc9cf83SThomas Weißschuh 55dc9cf83SThomas Weißschuh #include <linux/mutex.h> 65dc9cf83SThomas Weißschuh 7*1b6c8928SThomas Weißschuh struct time_namespace; 8*1b6c8928SThomas Weißschuh 95dc9cf83SThomas Weißschuh /* 105dc9cf83SThomas Weißschuh * Protects possibly multiple offsets writers racing each other 115dc9cf83SThomas Weißschuh * and tasks entering the namespace. 125dc9cf83SThomas Weißschuh */ 135dc9cf83SThomas Weißschuh extern struct mutex timens_offset_lock; 145dc9cf83SThomas Weißschuh 15*1b6c8928SThomas Weißschuh #ifdef CONFIG_TIME_NS_VDSO 16*1b6c8928SThomas Weißschuh int timens_vdso_alloc_vvar_page(struct time_namespace *ns); 17*1b6c8928SThomas Weißschuh void timens_vdso_free_vvar_page(struct time_namespace *ns); 18*1b6c8928SThomas Weißschuh #else /* !CONFIG_TIME_NS_VDSO */ 19*1b6c8928SThomas Weißschuh static inline int timens_vdso_alloc_vvar_page(struct time_namespace *ns) 20*1b6c8928SThomas Weißschuh { 21*1b6c8928SThomas Weißschuh return 0; 22*1b6c8928SThomas Weißschuh } 23*1b6c8928SThomas Weißschuh static inline void timens_vdso_free_vvar_page(struct time_namespace *ns) 24*1b6c8928SThomas Weißschuh { 25*1b6c8928SThomas Weißschuh } 26*1b6c8928SThomas Weißschuh #endif /* CONFIG_TIME_NS_VDSO */ 27*1b6c8928SThomas Weißschuh 285dc9cf83SThomas Weißschuh #endif /* _TIME_NAMESPACE_INTERNAL_H */ 29