X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=benchmarks%2Fcommon%2Fsyscalls.c;h=e9f04e23e5f645449a53362236cd1f44c43f1717;hb=83ed3f519de9929b6551b98677047228a8ab4d0c;hp=a168ebf6ae5c86c91eb0e7028089af6bb3008c7a;hpb=8f6e2420926471a7bd9a660305ab3d6a22f22dc9;p=riscv-tests.git diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c index a168ebf..e9f04e2 100644 --- a/benchmarks/common/syscalls.c +++ b/benchmarks/common/syscalls.c @@ -8,6 +8,9 @@ #define SYS_stats 1234 +// initialized in crt.S +int have_vec; + static long handle_frontend_syscall(long which, long arg0, long arg1, long arg2) { volatile uint64_t magic_mem[8] __attribute__((aligned(64))); @@ -150,8 +153,8 @@ void _init(int cid, int nc) #undef putchar int putchar(int ch) { - static char buf[64] __attribute__((aligned(64))); - static int buflen = 0; + static __thread char buf[64] __attribute__((aligned(64))); + static __thread int buflen = 0; buf[buflen++] = ch;