LWN.net Logo

Add __user/__kernel address space modifiers.

From:  Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
To:  bk-commits-head@vger.kernel.org
Subject:  Add __user/__kernel address space modifiers. When not
Date:  Wed, 09 Apr 2003 00:10:42 +0000

ChangeSet 1.1134, 2003/04/08 17:10:42-07:00, torvalds@penguin.transmeta.com

	Add __user/__kernel address space modifiers. When not
	checking, these end up being no-ops, but they get enabled
	by the type checker as special address_space attributes.


# This patch includes the following deltas:
#	           ChangeSet	1.1133  -> 1.1134 
#	include/linux/compiler.h	1.13    -> 1.14   
#

 compiler.h |    8 ++++++++
 1 files changed, 8 insertions(+)


diff -Nru a/include/linux/compiler.h b/include/linux/compiler.h
--- a/include/linux/compiler.h	Tue Apr  8 22:06:20 2003
+++ b/include/linux/compiler.h	Tue Apr  8 22:06:20 2003
@@ -1,6 +1,14 @@
 #ifndef __LINUX_COMPILER_H
 #define __LINUX_COMPILER_H
 
+#ifdef __CHECKER__
+  #define __user	__attribute__((address_space(1)))
+  #define __kernel	/* default address space */
+#else
+  #define __user
+  #define __kernel
+#endif
+
 #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
 #define inline		__inline__ __attribute__((always_inline))
 #define __inline__	__inline__ __attribute__((always_inline))
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Copyright © 2003, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds