Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/asm Add hokey (but ty...
details: https://anonhg.NetBSD.org/src/rev/49cf57347da5
branches: riastradh-drm2
changeset: 788092:49cf57347da5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:12:14 2013 +0000
description:
Add hokey (but typeof-free) get_user and put_user to <asm/uaccess.h>.
diffstat:
sys/external/bsd/drm2/include/asm/uaccess.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r f8d9a5168a9d -r 49cf57347da5 sys/external/bsd/drm2/include/asm/uaccess.h
--- a/sys/external/bsd/drm2/include/asm/uaccess.h Wed Jul 24 02:12:00 2013 +0000
+++ b/sys/external/bsd/drm2/include/asm/uaccess.h Wed Jul 24 02:12:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaccess.h,v 1.1.2.3 2013/07/24 02:04:16 riastradh Exp $ */
+/* $NetBSD: uaccess.h,v 1.1.2.4 2013/07/24 02:12:14 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -49,5 +49,10 @@
return -copyout(kernel_addr, user_addr, len);
}
+#define get_user(KERNEL_LOC, USER_ADDR) \
+ copy_from_user(&(KERNEL_LOC), (USER_ADDR), sizeof(KERNEL_LOC))
+
+#define put_user(KERNEL_LOC, USER_ADDR) \
+ copy_to_user((USER_ADDR), &(KERNEL_LOC), sizeof(KERNEL_LOC))
#endif /* _ASM_UACCESS_H_ */
Home |
Main Index |
Thread Index |
Old Index