diff options
| author | Jamie Gennis <jgennis@google.com> | 2012-06-13 16:40:54 -0700 |
|---|---|---|
| committer | Jesse Hall <jessehall@google.com> | 2012-06-19 09:52:24 -0700 |
| commit | 3be33e46187bfb1e42099bb4ba061a494356576c (patch) | |
| tree | c98cfa51f4f167a22c3e72f1bb5ab293166df603 | |
| parent | 4d4cc9ecc74ca7df7453b73e8ed62ff36c658f09 (diff) | |
| download | system_core-3be33e46187bfb1e42099bb4ba061a494356576c.zip system_core-3be33e46187bfb1e42099bb4ba061a494356576c.tar.gz system_core-3be33e46187bfb1e42099bb4ba061a494356576c.tar.bz2 | |
libsync: remove linux includes from sync/sync.h
This change removes the #includes of "linux/*.h" headers from the libsync
header. It currently does this by copying the needed structs that are in the
linux headers. This is intended to be a temporary solution.
Change-Id: Ie7e1a8e05fcf8809ba4aa0e2427efe141dae5327
| -rw-r--r-- | include/sync/sync.h | 21 | ||||
| -rw-r--r-- | libsync/sync.c | 5 |
2 files changed, 22 insertions, 4 deletions
diff --git a/include/sync/sync.h b/include/sync/sync.h index 6aa5f2d..f015fa1 100644 --- a/include/sync/sync.h +++ b/include/sync/sync.h @@ -19,11 +19,28 @@ #ifndef __SYS_CORE_SYNC_H #define __SYS_CORE_SYNC_H -#include <linux/sync.h> -#include <linux/sw_sync.h> +#include <sys/cdefs.h> +#include <stdint.h> __BEGIN_DECLS +// XXX: These structs are copied from the header "linux/sync.h". +struct sync_fence_info_data { + uint32_t len; + char name[32]; + int32_t status; + uint8_t pt_info[0]; +}; + +struct sync_pt_info { + uint32_t len; + char obj_name[32]; + char driver_name[32]; + int32_t status; + uint64_t timestamp_ns; + uint8_t driver_data[0]; +}; + /* timeout in msecs */ int sync_wait(int fd, unsigned int timeout); int sync_merge(const char *name, int fd1, int fd2); diff --git a/libsync/sync.c b/libsync/sync.c index 311da14..c20f15e 100644 --- a/libsync/sync.c +++ b/libsync/sync.c @@ -20,12 +20,13 @@ #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> - int sync_wait(int fd, unsigned int timeout) { __u32 to = timeout; |
