shithub: nix

Download patch

ref: 7d9f5607e87defb4366ff3c8ad9d24128884d869
parent: db55afd4a5f5297bce2b5a21427fc36d5f8d7a9c
author: glenda <glenda@cirno>
date: Fri May 3 17:24:56 EDT 2024

add files we have to change

diff: cannot open b/sys/include//null: file does not exist: 'b/sys/include//null'
--- /dev/null
+++ b/sys/include/tos.h
@@ -1,0 +1,24 @@
+typedef struct Tos Tos;
+typedef struct Plink Plink;
+
+#pragma incomplete Plink
+
+struct Tos {
+	struct			/* Per process profiling */
+	{
+		Plink	*pp;	/* known to be 0(ptr) */
+		Plink	*next;	/* known to be 4(ptr) */
+		Plink	*last;
+		Plink	*first;
+		ulong	pid;
+		ulong	what;
+	} prof;
+	uvlong	cyclefreq;	/* cycle clock frequency if there is one, 0 otherwise */
+	vlong	kcycles;	/* cycles spent in kernel */
+	vlong	pcycles;	/* cycles spent in process (kernel + user) */
+	ulong	pid;		/* might as well put the pid here */
+	ulong	clock;
+	/* top of stack is here */
+};
+
+extern Tos *_tos;
--- /dev/null
+++ b/sys/include/trace.h
@@ -1,0 +1,24 @@
+typedef enum Tevent {
+	SAdmit = 0,	/* Edf admit */
+	SRelease,	/* Edf release, waiting to be scheduled */
+	SEdf,		/* running under EDF */
+	SRun,		/* running best effort */
+	SReady,		/* runnable but not running  */
+	SSleep,		/* blocked */
+	SYield,		/* blocked waiting for release */
+	SSlice,		/* slice exhausted */
+	SDeadline,	/* proc's deadline */
+	SExpel,		/* Edf expel */
+	SDead,		/* proc dies */
+	SInts,		/* Interrupt start */
+	SInte,		/* Interrupt end */
+	SUser,		/* user event */
+	Nevent,
+} Tevent;
+
+typedef struct Traceevent	Traceevent;
+struct Traceevent {
+	ulong	pid;	
+	ulong	etype;	/* Event type */
+	vlong	time;	/* time stamp  */
+};