1 #ifndef _VX_LIMIT_CMD_H
2 #define _VX_LIMIT_CMD_H
5 /* rlimit vserver commands */
7 #define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0)
8 #define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0)
9 #define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0)
10 #define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0)
12 struct vcmd_ctx_rlimit_v0 {
19 struct vcmd_ctx_rlimit_mask_v0 {
25 #define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0)
27 struct vcmd_rlimit_stat_v0 {
35 #define CRLIM_UNSET (0ULL)
36 #define CRLIM_INFINITY (~0ULL)
37 #define CRLIM_KEEP (~1ULL)
41 #ifdef CONFIG_IA32_EMULATION
43 struct vcmd_ctx_rlimit_v0_x32 {
48 } __attribute__ ((aligned (4)));
50 #endif /* CONFIG_IA32_EMULATION */
52 #include <linux/compiler.h>
54 extern int vc_get_rlimit_mask(uint32_t, void __user *);
55 extern int vc_get_rlimit(struct vx_info *, void __user *);
56 extern int vc_set_rlimit(struct vx_info *, void __user *);
57 extern int vc_reset_minmax(struct vx_info *, void __user *);
59 extern int vc_rlimit_stat(struct vx_info *, void __user *);
61 #ifdef CONFIG_IA32_EMULATION
63 extern int vc_get_rlimit_x32(struct vx_info *, void __user *);
64 extern int vc_set_rlimit_x32(struct vx_info *, void __user *);
66 #endif /* CONFIG_IA32_EMULATION */
68 #endif /* __KERNEL__ */
69 #endif /* _VX_LIMIT_CMD_H */