Page MenuHomeFreeBSD

D15527.id42882.diff
No OneTemporary

D15527.id42882.diff

Index: head/sys/arm64/include/proc.h
===================================================================
--- head/sys/arm64/include/proc.h
+++ head/sys/arm64/include/proc.h
@@ -54,4 +54,18 @@
int narg;
};
+#ifdef _KERNEL
+
+#include <machine/pcb.h>
+
+#define GET_STACK_USAGE(total, used) do { \
+ struct thread *td = curthread; \
+ (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \
+ (used) = (char *)td->td_kstack + \
+ td->td_kstack_pages * PAGE_SIZE - \
+ (char *)&td; \
+} while (0)
+
+#endif
+
#endif /* !_MACHINE_PROC_H_ */

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 16, 5:58 PM (11 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40908386
Default Alt Text
D15527.id42882.diff (579 B)

Event Timeline