X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Flimit_def.h;h=6c99b2b1a2a330b527bf5b063c949168fe57e98b;hb=29fd9845a8128b8e7f6c3828da14d724f8e748f7;hp=b4a32c846a681127feebbb3a3fc14a9a28f320b6;hpb=0cbf992ea2fb9e247615e94c29b2083032a32152;p=util-vserver.git diff --git a/kernel/limit_def.h b/kernel/limit_def.h index b4a32c8..6c99b2b 100644 --- a/kernel/limit_def.h +++ b/kernel/limit_def.h @@ -7,16 +7,41 @@ #include "limit.h" +struct _vx_res_limit { + rlim_t soft; /* Context soft limit */ + rlim_t hard; /* Context hard limit */ + + rlim_atomic_t rcur; /* Current value */ + rlim_t rmin; /* Context minimum */ + rlim_t rmax; /* Context maximum */ + + atomic_t lhit; /* Limit hits */ +}; + /* context sub struct */ struct _vx_limit { - atomic_t ticks; - - unsigned long rlim[NUM_LIMITS]; /* Context limit */ - unsigned long rmax[NUM_LIMITS]; /* Context maximum */ - atomic_t rcur[NUM_LIMITS]; /* Current value */ - atomic_t lhit[NUM_LIMITS]; /* Limit hits */ + struct _vx_res_limit res[NUM_LIMITS]; }; +#ifdef CONFIG_VSERVER_DEBUG + +static inline void __dump_vx_limit(struct _vx_limit *limit) +{ + int i; + + printk("\t_vx_limit:"); + for (i=0; i