vserver 1.9.5.x5
[linux-2.6.git] / include / asm-s390 / system.h
index d9f3498..8565a8a 100644 (file)
@@ -105,11 +105,27 @@ static inline void restore_access_regs(unsigned int *acrs)
 
 #define prepare_arch_switch(rq, next)  do { } while(0)
 #define task_running(rq, p)            ((rq)->curr == (p))
+
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+extern void account_user_vtime(struct task_struct *);
+extern void account_system_vtime(struct task_struct *);
+
+#define finish_arch_switch(rq, prev) do {                                   \
+       set_fs(current->thread.mm_segment);                                  \
+       spin_unlock(&(rq)->lock);                                            \
+       account_system_vtime(prev);                                          \
+       local_irq_enable();                                                  \
+} while (0)
+
+#else
+
 #define finish_arch_switch(rq, prev) do {                                   \
        set_fs(current->thread.mm_segment);                                  \
        spin_unlock_irq(&(rq)->lock);                                        \
 } while (0)
 
+#endif
+
 #define nop() __asm__ __volatile__ ("nop")
 
 #define xchg(ptr,x) \