updated to 2.6.13.3-vs2.1.0-rc4 headers
[util-vserver.git] / util-vserver / kernel / limit_def.h
1 #ifndef _VX_LIMIT_DEF_H
2 #define _VX_LIMIT_DEF_H
3
4 #include <asm/atomic.h>
5 #include <asm/resource.h>
6
7 #include "limit.h"
8
9 /* context sub struct */
10
11 struct _vx_limit {
12 //      atomic_t ticks;
13
14         unsigned long rlim[NUM_LIMITS];         /* Context limit */
15         unsigned long rmax[NUM_LIMITS];         /* Context maximum */
16         atomic_t rcur[NUM_LIMITS];              /* Current value */
17         atomic_t lhit[NUM_LIMITS];              /* Limit hits */
18 };
19
20 #ifdef CONFIG_VSERVER_DEBUG
21
22 static inline void __dump_vx_limit(struct _vx_limit *limit)
23 {
24         int i;
25
26         printk("\t_vx_limit:");
27         for (i=0; i<NUM_LIMITS; i++) {
28                 printk("\t [%2d] = %8lu, %8lu, %8d, %8d\n",
29                         i, limit->rlim[i], limit->rmax[i],
30                         atomic_read(&limit->rcur[i]),
31                         atomic_read(&limit->lhit[i]));
32         }
33 }
34
35 #endif
36
37 #endif  /* _VX_LIMIT_DEF_H */