Move definition of struct rusage_ext before struct thread.
MFC after: 1 week
This commit is contained in:
parent
fd73ccb143
commit
d54a8529a7
@ -172,6 +172,27 @@ struct kdtrace_proc;
|
||||
struct kdtrace_thread;
|
||||
struct cpuset;
|
||||
|
||||
/*
|
||||
* XXX: Does this belong in resource.h or resourcevar.h instead?
|
||||
* Resource usage extension. The times in rusage structs in the kernel are
|
||||
* never up to date. The actual times are kept as runtimes and tick counts
|
||||
* (with control info in the "previous" times), and are converted when
|
||||
* userland asks for rusage info. Backwards compatibility prevents putting
|
||||
* this directly in the user-visible rusage struct.
|
||||
*
|
||||
* Locking for p_rux: (cj) means (j) for p_rux and (c) for p_crux.
|
||||
* Locking for td_rux: (t) for all fields.
|
||||
*/
|
||||
struct rusage_ext {
|
||||
u_int64_t rux_runtime; /* (cj) Real time. */
|
||||
u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */
|
||||
u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */
|
||||
u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */
|
||||
u_int64_t rux_uu; /* (c) Previous user time in usec. */
|
||||
u_int64_t rux_su; /* (c) Previous sys time in usec. */
|
||||
u_int64_t rux_tu; /* (c) Previous total time in usec. */
|
||||
};
|
||||
|
||||
/*
|
||||
* Kernel runnable context (thread).
|
||||
* This is what is put to sleep and reactivated.
|
||||
@ -425,26 +446,6 @@ do { \
|
||||
#define TD_SET_RUNQ(td) (td)->td_state = TDS_RUNQ
|
||||
#define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN
|
||||
|
||||
/*
|
||||
* XXX: Does this belong in resource.h or resourcevar.h instead?
|
||||
* Resource usage extension. The times in rusage structs in the kernel are
|
||||
* never up to date. The actual times are kept as runtimes and tick counts
|
||||
* (with control info in the "previous" times), and are converted when
|
||||
* userland asks for rusage info. Backwards compatibility prevents putting
|
||||
* this directly in the user-visible rusage struct.
|
||||
*
|
||||
* Locking: (cj) means (j) for p_rux and (c) for p_crux.
|
||||
*/
|
||||
struct rusage_ext {
|
||||
u_int64_t rux_runtime; /* (cj) Real time. */
|
||||
u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */
|
||||
u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */
|
||||
u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */
|
||||
u_int64_t rux_uu; /* (c) Previous user time in usec. */
|
||||
u_int64_t rux_su; /* (c) Previous sys time in usec. */
|
||||
u_int64_t rux_tu; /* (c) Previous total time in usec. */
|
||||
};
|
||||
|
||||
/*
|
||||
* Process structure.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user