]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/android/ashmem.h
staging: android: ashmem: Add support for 32bit ashmem calls in a 64bit kernel
[~andy/linux] / drivers / staging / android / ashmem.h
index 1976b10ef93ebedf06b587ee8b6956b99d685e9c..8dc0f0d3adf310b651cf6b17742795ae5269600d 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <linux/limits.h>
 #include <linux/ioctl.h>
+#include <linux/compat.h>
 
 #define ASHMEM_NAME_LEN                256
 
@@ -45,4 +46,10 @@ struct ashmem_pin {
 #define ASHMEM_GET_PIN_STATUS  _IO(__ASHMEMIOC, 9)
 #define ASHMEM_PURGE_ALL_CACHES        _IO(__ASHMEMIOC, 10)
 
+/* support of 32bit userspace on 64bit platforms */
+#ifdef CONFIG_COMPAT
+#define COMPAT_ASHMEM_SET_SIZE         _IOW(__ASHMEMIOC, 3, compat_size_t)
+#define COMPAT_ASHMEM_SET_PROT_MASK    _IOW(__ASHMEMIOC, 5, unsigned int)
+#endif
+
 #endif /* _LINUX_ASHMEM_H */