From c45cffdbe1a1b816fd9a88f88bb83bd7078a1e4e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 20 Jun 2021 12:38:27 -0400 Subject: sim: callback: add a getpid interface Rather than hit the OS interface directly, use the existing callback layer so the instantiator can decide behavior. --- sim/common/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sim/common/syscall.c') diff --git a/sim/common/syscall.c b/sim/common/syscall.c index 4e76d20..7ef34b9 100644 --- a/sim/common/syscall.c +++ b/sim/common/syscall.c @@ -579,7 +579,8 @@ cb_syscall (host_callback *cb, CB_SYSCALL *sc) break; case CB_SYS_getpid: - result = getpid (); + /* POSIX says getpid always succeeds. */ + result = (*cb->getpid) (cb); break; case CB_SYS_time : -- cgit v1.1