[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v9 1/5] xen: introduce ptrdiff_t, fix uintptr_t



uintptr_t should be "unsigned long" -- same size as a pointer.

Introduce the new type "ptrdiff_t" which is defined as the signed
integer type of the result of subtracting two pointers.

Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
CC: jbeulich@xxxxxxxx
CC: andrew.cooper3@xxxxxxxxxx
CC: julien.grall@xxxxxxx
CC: George.Dunlap@xxxxxxxxxxxxx
CC: ian.jackson@xxxxxxxxxxxxx
CC: konrad.wilk@xxxxxxxxxx
CC: tim@xxxxxxx
CC: wei.liu2@xxxxxxxxxx
---
Changes in v9:
- new patch
---
 xen/include/xen/types.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h
index 03f0fe6..e70adac 100644
--- a/xen/include/xen/types.h
+++ b/xen/include/xen/types.h
@@ -52,7 +52,8 @@ typedef __u32 __be32;
 typedef __u64 __le64;
 typedef __u64 __be64;
 
-typedef unsigned int __attribute__((__mode__(__pointer__))) uintptr_t;
+typedef unsigned long __attribute__((__mode__(__pointer__))) uintptr_t;
+typedef long ptrdiff_t;
 
 typedef bool bool_t;
 #define test_and_set_bool(b)   xchg(&(b), true)
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.