vserver 2.0-rc4
[linux-2.6.git] / include / linux / vs_sched.h
index 0eb1ee6..42fca7d 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef _VX_VS_SCHED_H
 #define _VX_VS_SCHED_H
 
+#ifndef        CONFIG_VSERVER
+#warning config options missing
+#endif
 
 #include "vserver/sched.h"
 
@@ -68,6 +71,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