Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Synchronize SYS_SYSCALL() with other syscall implem...
details: https://anonhg.NetBSD.org/src/rev/0fed3f1f1462
branches: trunk
changeset: 368220:0fed3f1f1462
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Jun 29 16:33:09 2022 +0000
description:
Synchronize SYS_SYSCALL() with other syscall implementations and
call trace_exit() even if trace_enter() returned an error.
PR kern/52166 "syscallemu does not work on sparc (32-bit)"
PR toolchain/56117 "New test failures on amd64 since switch to gcc10"
diffstat:
sys/kern/sys_syscall.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 943fda8bc735 -r 0fed3f1f1462 sys/kern/sys_syscall.c
--- a/sys/kern/sys_syscall.c Wed Jun 29 15:58:12 2022 +0000
+++ b/sys/kern/sys_syscall.c Wed Jun 29 16:33:09 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_syscall.c,v 1.14 2022/03/14 12:02:19 riastradh Exp $ */
+/* $NetBSD: sys_syscall.c,v 1.15 2022/06/29 16:33:09 hannken Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_syscall.c,v 1.14 2022/03/14 12:02:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_syscall.c,v 1.15 2022/06/29 16:33:09 hannken Exp $");
#include <sys/syscall_stats.h>
#include <sys/syscallvar.h>
@@ -99,9 +99,8 @@
#endif
error = trace_enter(code, callp, TRACE_ARGS);
- if (__predict_false(error != 0))
- return error;
- error = sy_call(callp, l, &uap->args, rval);
+ if (__predict_true(error == 0))
+ error = sy_call(callp, l, &uap->args, rval);
trace_exit(code, callp, &uap->args, rval, error);
CONCAT(SYS_SYSCALL, _biglockcheck)(p, code);
return error;
Home |
Main Index |
Thread Index |
Old Index