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] / include / linux / vs_sched.h
index 0eb1ee6..b1f7aa1 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _VX_VS_SCHED_H
 #define _VX_VS_SCHED_H
 
-
 #include "vserver/sched.h"
 
 
@@ -68,6 +67,26 @@ static inline void vx_onhold_dec(struct vx_info *vxi)
                __vx_onhold_update(vxi);
 }
 
+static inline void vx_account_user(struct vx_info *vxi,
+       cputime_t cputime, int nice)
+{
+       int cpu = smp_processor_id();
+
+       if (!vxi)
+               return;
+       vxi->sched.cpu[cpu].user_ticks += cputime;
+}
+
+static inline void vx_account_system(struct vx_info *vxi,
+       cputime_t cputime, int idle)
+{
+       int cpu = smp_processor_id();
+
+       if (!vxi)
+               return;
+       vxi->sched.cpu[cpu].sys_ticks += cputime;
+}
+
 #else
 #warning duplicate inclusion
 #endif