summaryrefslogtreecommitdiffstats
path: root/libsync
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2016-08-24 14:49:18 -0700
committerChristopher Ferris <cferris@google.com>2016-08-26 16:48:18 -0700
commitf83c7923f956328a022cddcfcd2d13d797a22a63 (patch)
tree5e2cc230d68bd45de2e2c9de9d36edf7c0a3fb75 /libsync
parent091b631915c68c801bbded01ac8bb3a7af18436e (diff)
downloadcore-f83c7923f956328a022cddcfcd2d13d797a22a63.tar.gz
core-f83c7923f956328a022cddcfcd2d13d797a22a63.tar.bz2
core-f83c7923f956328a022cddcfcd2d13d797a22a63.zip
Update for kernel headers v4.7.2.
The new uapi kernel headers added a new SEGV reason code, so add it to the tombstone code. Update sync.c to include the needed data structures itself. Someone else will be fixing this to work on old versus new kernels. Change-Id: Icb27713ea38a20003c7671a9bca262eebd96099b
Diffstat (limited to 'libsync')
-rw-r--r--libsync/sync.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libsync/sync.c b/libsync/sync.c
index d73bb111c..169dc3678 100644
--- a/libsync/sync.c
+++ b/libsync/sync.c
@@ -21,13 +21,27 @@
#include <stdint.h>
#include <string.h>
-#include <linux/sync.h>
#include <linux/sw_sync.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <sync/sync.h>
+
+// The sync code is undergoing a major change. Add enough in to get
+// everything to compile wih the latest uapi headers.
+struct sync_merge_data {
+ int32_t fd2;
+ char name[32];
+ int32_t fence;
+};
+
+#define SYNC_IOC_MAGIC '>'
+#define SYNC_IOC_WAIT _IOW(SYNC_IOC_MAGIC, 0, __s32)
+#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 1, struct sync_merge_data)
+#define SYNC_IOC_FENCE_INFO _IOWR(SYNC_IOC_MAGIC, 2, struct sync_fence_info_data)
+
int sync_wait(int fd, int timeout)
{
__s32 to = timeout;