]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen: introduce ptrdiff_t
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 26 Feb 2019 18:40:34 +0000 (10:40 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 26 Feb 2019 18:40:34 +0000 (10:40 -0800)
Introduce the new type "ptrdiff_t" which is defined as the signed
integer type of the result of subtracting two pointers. Use
__PTRDIFF_TYPE__ to define it.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: jbeulich@suse.com
CC: andrew.cooper3@citrix.com
CC: julien.grall@arm.com
CC: George.Dunlap@eu.citrix.com
CC: ian.jackson@eu.citrix.com
CC: konrad.wilk@oracle.com
CC: tim@xen.org
CC: wei.liu2@citrix.com
---
Changes in v11:
- split patch

xen/include/xen/types.h

index 1059fab4b87f60bbfa58de537ac1adf2724794b2..508a4622b3523a6ee4b91d8a427af6038b121859 100644 (file)
@@ -53,6 +53,7 @@ typedef __u64 __le64;
 typedef __u64 __be64;
 
 typedef __UINTPTR_TYPE__ uintptr_t;
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
 
 typedef bool bool_t;
 #define test_and_set_bool(b)   xchg(&(b), true)