Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys If any argument of a syscall is a pointer, set SYCALL_AR...
details: https://anonhg.NetBSD.org/src/rev/217782528154
branches: trunk
changeset: 780691:217782528154
user: matt <matt%NetBSD.org@localhost>
date: Fri Aug 03 18:08:01 2012 +0000
description:
If any argument of a syscall is a pointer, set SYCALL_ARG_PTR as a flag.
diffstat:
sys/kern/makesyscalls.sh | 10 +++++++++-
sys/sys/systm.h | 3 ++-
2 files changed, 11 insertions(+), 2 deletions(-)
diffs (48 lines):
diff -r 8538f2dae2a0 -r 217782528154 sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh Fri Aug 03 15:59:04 2012 +0000
+++ b/sys/kern/makesyscalls.sh Fri Aug 03 18:08:01 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makesyscalls.sh,v 1.124 2012/08/03 11:31:33 pooka Exp $
+# $NetBSD: makesyscalls.sh,v 1.125 2012/08/03 18:08:01 matt Exp $
#
# Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
# All rights reserved.
@@ -532,6 +532,7 @@
isvarargs = 0;
args64 = 0;
+ ptr = 0;
while (f <= end) {
if ($f == "...") {
f++;
@@ -568,6 +569,13 @@
sycall_flags = "SYCALL_ARG"argc-1"_64 | " sycall_flags;
args64++;
}
+ if (index(argtype[argc], "*") != 0 && ptr == 0) {
+ if (sycall_flags == "0")
+ sycall_flags = "SYCALL_ARG_PTR";
+ else
+ sycall_flags = "SYCALL_ARG_PTR | " sycall_flags;
+ ptr = 1;
+ }
argname[argc]=$f;
f += 2; # skip name, and any comma
}
diff -r 8538f2dae2a0 -r 217782528154 sys/sys/systm.h
--- a/sys/sys/systm.h Fri Aug 03 15:59:04 2012 +0000
+++ b/sys/sys/systm.h Fri Aug 03 18:08:01 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systm.h,v 1.256 2011/11/27 11:07:21 martin Exp $ */
+/* $NetBSD: systm.h,v 1.257 2012/08/03 18:08:01 matt Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@@ -143,6 +143,7 @@
#define SYCALL_ARG6_64 0x0800000
#define SYCALL_ARG7_64 0x1000000
#define SYCALL_NOSYS 0x2000000 /* permanent nosys in sysent[] */
+#define SYCALL_ARG_PTR 0x3000000 /* at least one argument is a pointer */
#define SYCALL_RET_64_P(sy) ((sy)->sy_flags & SYCALL_RET_64)
#define SYCALL_ARG_64_P(sy, n) ((sy)->sy_flags & (SYCALL_ARG0_64 << (n)))
#define SYCALL_ARG_64_MASK(sy) (((sy)->sy_flags >> 17) & 0xff)
Home |
Main Index |
Thread Index |
Old Index