Removed intptr_t
authorKevin Klues <klueska@ros-dev.(none)>
Wed, 24 Mar 2010 07:48:22 +0000 (00:48 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:37 +0000 (17:35 -0700)
intptr_t considered harmful because arithmetic on pointers
greater than 0x80000000 can produce unexpected results.

kern/arch/i686/types.h
kern/arch/sparc/types.h

index dc8ea85..5b29fad 100644 (file)
@@ -29,10 +29,8 @@ typedef long ssize_t;
 typedef int pid_t;
 
 // Pointers and addresses are 32 bits long.
-// We use pointer types to represent virtual addresses,
-// uintptr_t to represent the numerical values of virtual addresses,
-// and physaddr_t to represent physical addresses.
-typedef int32_t intptr_t;
+// We use pointer types to represent virtual addresses and
+// uintptr_t to represent the numerical values of virtual addresses.
 typedef uint32_t uintptr_t;
 
 #endif /* !ROS_INC_TYPES_H */
index 28853dc..36db193 100644 (file)
@@ -32,7 +32,6 @@ typedef int pid_t;
 // We use pointer types to represent virtual addresses,
 // uintptr_t to represent the numerical values of virtual addresses,
 // and physaddr_t to represent physical addresses.
-typedef int32_t intptr_t;
 typedef uint32_t uintptr_t;
 
 #endif /* !ROS_INC_TYPES_H */