summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2017-04-12 17:39:37 +0100
committerYongqin Liu <yongqin.liu@linaro.org>2017-04-12 17:39:37 +0100
commite3d1232355e275724e622970986a966a125b5bdb (patch)
treeef565bc9c3a84ca956828105689283251ba415ed
parent051e93f23ff0654d5e54bd08624d34f6c4f8ffc4 (diff)
downloadlinaro-android-kernel-test-e3d1232355e275724e622970986a966a125b5bdb.tar.gz
sync-basic: fix compiling problem with android o preview
sync.h and sw-sync.h were removed from bionic header files Change-Id: I4c9aede3fdb91536d6094e12b4eda826276e248e Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--.gitreview2
-rw-r--r--sync-basic/sw_sync.h33
-rw-r--r--sync-basic/sync-basic.c8
-rw-r--r--sync-basic/sync.h53
4 files changed, 88 insertions, 8 deletions
diff --git a/.gitreview b/.gitreview
index e6ab2a2..4ab39c2 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,4 +2,4 @@
host=android-review.linaro.org
port=29418
project=platform/external/linaro-android-kernel-test
-defaultbranch=linaro-nougat
+defaultbranch=linaro-o-preview
diff --git a/sync-basic/sw_sync.h b/sync-basic/sw_sync.h
new file mode 100644
index 0000000..ac50000
--- /dev/null
+++ b/sync-basic/sw_sync.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_SW_SYNC_H
+#define _UAPI_LINUX_SW_SYNC_H
+#include <linux/types.h>
+struct sw_sync_create_fence_data {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __u32 value;
+ char name[32];
+ __s32 fence;
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define SW_SYNC_IOC_MAGIC 'W'
+#define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0, struct sw_sync_create_fence_data)
+#define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
+#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
diff --git a/sync-basic/sync-basic.c b/sync-basic/sync-basic.c
index b1b263a..7b60e32 100644
--- a/sync-basic/sync-basic.c
+++ b/sync-basic/sync-basic.c
@@ -22,15 +22,9 @@
#include <sys/stat.h>
#include <sys/types.h>
-#ifdef ANDROID
-/* kernel headers on android */
-#include <linux/sync.h>
-#include <linux/sw_sync.h>
-#else
/* set KDIR in Makefile to point to these headers */
#include "sync.h"
#include "sw_sync.h"
-#endif /* ANDROID */
#define SW_SYNC_DEV "/dev/sw_sync"
@@ -97,7 +91,7 @@ void create_and_delete_fence (void)
ret = close (f.fence);
if (ret < 0)
fatal (errno, "can't delete fence");
-
+
pass(NULL);
}
diff --git a/sync-basic/sync.h b/sync-basic/sync.h
new file mode 100644
index 0000000..bbf6641
--- /dev/null
+++ b/sync-basic/sync.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_SYNC_H
+#define _UAPI_LINUX_SYNC_H
+#include <linux/ioctl.h>
+#include <linux/types.h>
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+struct sync_merge_data {
+ __s32 fd2;
+ char name[32];
+ __s32 fence;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+struct sync_pt_info {
+ __u32 len;
+ char obj_name[32];
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ char driver_name[32];
+ __s32 status;
+ __u64 timestamp_ns;
+ __u8 driver_data[0];
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+struct sync_fence_info_data {
+ __u32 len;
+ char name[32];
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __s32 status;
+ __u8 pt_info[0];
+};
+#define SYNC_IOC_MAGIC '>'
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#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)
+#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */