1 #ifndef _VX_CVIRT_DEF_H
2 #define _VX_CVIRT_DEF_H
4 #include <linux/jiffies.h>
5 #include <linux/utsname.h>
6 #include <linux/spinlock.h>
7 #include <linux/time.h>
8 #include <asm/atomic.h>
11 struct _vx_usage_stat {
21 /* context sub struct */
24 int max_threads; /* maximum allowed threads */
25 atomic_t nr_threads; /* number of current threads */
26 atomic_t nr_running; /* number of running threads */
27 atomic_t nr_uninterruptible; /* number of uninterruptible threads */
29 atomic_t nr_onhold; /* processes on hold */
30 uint32_t onhold_last; /* jiffies when put on hold */
32 struct timespec bias_idle;
33 struct timespec bias_uptime; /* context creation point */
34 uint64_t bias_clock; /* offset in clock_t */
36 struct new_utsname utsname;
38 spinlock_t load_lock; /* lock for the load averages */
39 atomic_t load_updates; /* nr of load updates done so far */
40 uint32_t load_last; /* last time load was cacled */
41 uint32_t load[3]; /* load averages 1,5,15 */
43 struct _vx_usage_stat cpustat[NR_CPUS];
51 /* context sub struct */
54 unsigned long total_forks;
56 struct _vx_sock_acc sock[5][3];
59 #endif /* _VX_CVIRT_DEF_H */