This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / kernel / vserver / limit_init.h
1
2 static inline void vx_info_init_limit(struct _vx_limit *limit)
3 {
4         int lim;
5
6         for (lim=0; lim<NUM_LIMITS; lim++) {
7                 limit->rlim[lim] = RLIM_INFINITY;
8                 limit->rmax[lim] = 0;
9                 atomic_set(&limit->rcur[lim], 0);
10                 atomic_set(&limit->lhit[lim], 0);
11         }
12 }
13
14 static inline void vx_info_exit_limit(struct _vx_limit *limit)
15 {
16 #ifdef  CONFIG_VSERVER_DEBUG
17         unsigned long value;
18         unsigned int lim;
19
20         for (lim=0; lim<NUM_LIMITS; lim++) {
21                 value = atomic_read(&limit->rcur[lim]);
22                 vxwprintk(value,
23                         "!!! limit: %p[%s,%d] = %ld on exit.",
24                         limit, vlimit_name[lim], lim, value);
25         }
26 #endif
27 }
28