#include <linux/time.h>
#include <linux/jiffies.h>
#include <linux/cpu.h>
+#include <linux/vserver/sched.h>
+#include <linux/vserver/cvirt.h>
#include <asm/uaccess.h>
#include <asm/div64.h>
*/
asmlinkage long sys_getpid(void)
{
- return current->tgid;
+ return vx_map_tgid(current->vx_info, current->tgid);
}
/*
#endif
break;
}
- return pid;
+ return vx_map_tgid(current->vx_info, pid);
}
asmlinkage long sys_getuid(void)
tp.tv_nsec = tp.tv_nsec - NSEC_PER_SEC;
tp.tv_sec++;
}
+ if (vx_flags(VXF_VIRT_UPTIME, 0))
+ vx_vsi_uptime(&tp, NULL);
val.uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
val.procs = nr_threads;
} while (read_seqretry(&xtime_lock, seq));
+/* if (vx_flags(VXF_VIRT_CPU, 0))
+ vx_vsi_cpu(val);
+*/
si_meminfo(&val);
si_swapinfo(&val);