From 314bca3dc19a864c76153bfcd5a58be8c40000f9 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 30 Aug 2024 19:20:21 +0300 Subject: improvements to shared memory handling + Now each shared region is reference counter (technically each region is refernce counted, private regions just have a count of 1). Also, syscalls that touch the TLB get flushed, but should probably look into where else this flushing might be needed. --- tests/common/sys.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/common/sys.h') diff --git a/tests/common/sys.h b/tests/common/sys.h index 6d5e493..3e98abf 100644 --- a/tests/common/sys.h +++ b/tests/common/sys.h @@ -86,9 +86,10 @@ static inline void *sys_ref_sharedmem(id_t tid, uintptr_t addr, vmflags_t flags) return (void *)r.a0; } -static inline void sys_free_mem(uintptr_t start) +static inline enum sys_status sys_free_mem(uintptr_t start) { - syscall1(SYS_FREE_MEM, start); + struct sys_ret r = syscall1(SYS_FREE_MEM, start); + return r.s; } static inline uint64_t sys_timebase() -- cgit v1.3