projects/aports·blob master · refs

13 lines · 417 B

1Taken from the posix-riscv64 subdirectory in the community/drawterm source.
2
3diff -uNr 9base-6-orig/lib9/getcallerpc-riscv64.c 9base-6/lib9/getcallerpc-riscv64.c
4--- 9base-6-orig/lib9/getcallerpc-riscv64.c 1970-01-01 01:00:00.000000000 +0100
5+++ 9base-6/lib9/getcallerpc-riscv64.c 2021-07-04 16:39:04.452113924 +0200
6@@ -0,0 +1,7 @@
7+#include <lib9.h>
8+
9+ulong
10+getcallerpc(void *x)
11+{
12+ return ((uintptr*)x)[-1];
13+}