Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / kernel / vserver / limit_init.h
1
2
3 #include <linux/config.h>
4
5
6 static inline void vx_info_init_limit(struct _vx_limit *limit)
7 {
8         int lim;
9
10         for (lim=0; lim<NUM_LIMITS; lim++) {
11                 limit->rlim[lim] = RLIM_INFINITY;
12                 limit->rmax[lim] = 0;
13                 atomic_set(&limit->rcur[lim], 0);
14                 atomic_set(&limit->lhit[lim], 0);
15         }
16 }
17
18 static inline void vx_info_exit_limit(struct _vx_limit *limit)
19 {
20 #ifdef  CONFIG_VSERVER_DEBUG
21         unsigned long value;
22         unsigned int lim;
23
24         for (lim=0; lim<NUM_LIMITS; lim++) {
25                 value = atomic_read(&limit->rcur[lim]);
26                 vxwprintk(value,
27                         "!!! limit: %p[%s,%d] = %ld on exit.",
28                         limit, vlimit_name[lim], lim, value);
29         }
30 #endif
31 }
32