xref: /plan9/sys/include/tos.h (revision 92f23974a9fc639034aacb1b807fd633b3325041)
1 typedef struct Tos Tos;
2 typedef struct Plink Plink;
3 
4 #pragma incomplete Plink
5 
6 struct Tos {
7 	struct			/* Per process profiling */
8 	{
9 		Plink	*pp;	/* known to be 0(ptr) */
10 		Plink	*next;	/* known to be 4(ptr) */
11 		Plink	*last;
12 		Plink	*first;
13 		ulong	pid;
14 		ulong	what;
15 	} prof;
16 	uvlong	cyclefreq;	/* cycle clock frequency if there is one, 0 otherwise */
17 	vlong	kcycles;	/* cycles spent in kernel */
18 	vlong	pcycles;	/* cycles spent in process (kernel + user) */
19 	ulong	pid;		/* might as well put the pid here */
20 	ulong	clock;
21 	/* scratch space for kernel use (e.g., mips fp delay-slot execution) */
22 	ulong	kscr[4];
23 	/* top of stack is here */
24 };
25 
26 extern Tos *_tos;
27