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/wait.h>
8 #include <linux/time.h>
9 #include <asm/atomic.h>
14 struct _vx_usage_stat {
25 wait_queue_head_t log_wait;
26 spinlock_t logbuf_lock; /* lock for the log buffer */
28 unsigned long log_start; /* next char to be read by syslog() */
29 unsigned long con_start; /* next char to be sent to consoles */
30 unsigned long log_end; /* most-recently-written-char + 1 */
31 unsigned long logged_chars; /* #chars since last read+clear operation */
37 /* context sub struct */
40 int max_threads; /* maximum allowed threads */
41 atomic_t nr_threads; /* number of current threads */
42 atomic_t nr_running; /* number of running threads */
43 atomic_t nr_uninterruptible; /* number of uninterruptible threads */
45 atomic_t nr_onhold; /* processes on hold */
46 uint32_t onhold_last; /* jiffies when put on hold */
48 struct timespec bias_idle;
49 struct timespec bias_uptime; /* context creation point */
50 uint64_t bias_clock; /* offset in clock_t */
52 struct new_utsname utsname;
54 spinlock_t load_lock; /* lock for the load averages */
55 atomic_t load_updates; /* nr of load updates done so far */
56 uint32_t load_last; /* last time load was cacled */
57 uint32_t load[3]; /* load averages 1,5,15 */
59 atomic_t total_forks; /* number of forks so far */
61 struct _vx_syslog syslog;
69 /* context sub struct */
72 unsigned long total_forks;
74 struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
77 #endif /* _VX_CVIRT_DEF_H */