diff options
author | Jesse Hall <jessehall@google.com> | 2017-02-12 16:42:11 -0800 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2017-02-23 18:44:50 -0800 |
commit | b7fdb2a1284143b8cee11483646b8753262ad165 (patch) | |
tree | e6ae6d912d3a674900bdf789fb79581c1729b652 /libsync | |
parent | 836661616fcf4bc023b192d1c320f0727a9dfef9 (diff) | |
download | system_core-b7fdb2a1284143b8cee11483646b8753262ad165.tar.gz system_core-b7fdb2a1284143b8cee11483646b8753262ad165.tar.bz2 system_core-b7fdb2a1284143b8cee11483646b8753262ad165.zip |
sync: move declarations from sync/sync.h to sync.c
None of these should be needed or used outside of sync.c.
Test: lunch bullhead-eng ; m
Change-Id: I548a499d0e2ada2ab4987e63a8116327c3be0076
Diffstat (limited to 'libsync')
-rw-r--r-- | libsync/include/sync/sync.h | 53 | ||||
-rw-r--r-- | libsync/sync.c | 39 |
2 files changed, 39 insertions, 53 deletions
diff --git a/libsync/include/sync/sync.h b/libsync/include/sync/sync.h index 8755d2b5d..d29ed8541 100644 --- a/libsync/include/sync/sync.h +++ b/libsync/include/sync/sync.h @@ -32,19 +32,8 @@ #include "../ndk/sync.h" -#include <sys/cdefs.h> -#include <stdint.h> - -#include <linux/types.h> - __BEGIN_DECLS -struct sync_legacy_merge_data { - int32_t fd2; - char name[32]; - int32_t fence; -}; - struct sync_fence_info_data { uint32_t len; char name[32]; @@ -61,48 +50,6 @@ struct sync_pt_info { uint8_t driver_data[0]; }; -#define SYNC_IOC_MAGIC '>' - -/** - * DOC: SYNC_IOC_LEGACY_WAIT - wait for a fence to signal - * - * pass timeout in milliseconds. Waits indefinitely timeout < 0. - * - * This is the legacy version of the Sync API before the de-stage that happened - * on Linux kernel 4.7. - */ -#define SYNC_IOC_LEGACY_WAIT _IOW(SYNC_IOC_MAGIC, 0, __s32) - -/** - * DOC: SYNC_IOC_MERGE - merge two fences - * - * Takes a struct sync_merge_data. Creates a new fence containing copies of - * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the - * new fence's fd in sync_merge_data.fence - * - * This is the legacy version of the Sync API before the de-stage that happened - * on Linux kernel 4.7. - */ -#define SYNC_IOC_LEGACY_MERGE _IOWR(SYNC_IOC_MAGIC, 1, \ - struct sync_legacy_merge_data) - -/** - * DOC: SYNC_IOC_LEGACY_FENCE_INFO - get detailed information on a fence - * - * Takes a struct sync_fence_info_data with extra space allocated for pt_info. - * Caller should write the size of the buffer into len. On return, len is - * updated to reflect the total size of the sync_fence_info_data including - * pt_info. - * - * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence. - * To iterate over the sync_pt_infos, use the sync_pt_info.len field. - * - * This is the legacy version of the Sync API before the de-stage that happened - * on Linux kernel 4.7. - */ -#define SYNC_IOC_LEGACY_FENCE_INFO _IOWR(SYNC_IOC_MAGIC, 2,\ - struct sync_fence_info_data) - /* timeout in msecs */ int sync_wait(int fd, int timeout); struct sync_fence_info_data *sync_fence_info(int fd); diff --git a/libsync/sync.c b/libsync/sync.c index f3e26e111..e68cc899d 100644 --- a/libsync/sync.c +++ b/libsync/sync.c @@ -29,6 +29,45 @@ #include <sync/sync.h> +/* Legacy Sync API */ + +struct sync_legacy_merge_data { + int32_t fd2; + char name[32]; + int32_t fence; +}; + +/** + * DOC: SYNC_IOC_MERGE - merge two fences + * + * Takes a struct sync_merge_data. Creates a new fence containing copies of + * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the + * new fence's fd in sync_merge_data.fence + * + * This is the legacy version of the Sync API before the de-stage that happened + * on Linux kernel 4.7. + */ +#define SYNC_IOC_LEGACY_MERGE _IOWR(SYNC_IOC_MAGIC, 1, \ + struct sync_legacy_merge_data) + +/** + * DOC: SYNC_IOC_LEGACY_FENCE_INFO - get detailed information on a fence + * + * Takes a struct sync_fence_info_data with extra space allocated for pt_info. + * Caller should write the size of the buffer into len. On return, len is + * updated to reflect the total size of the sync_fence_info_data including + * pt_info. + * + * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence. + * To iterate over the sync_pt_infos, use the sync_pt_info.len field. + * + * This is the legacy version of the Sync API before the de-stage that happened + * on Linux kernel 4.7. + */ +#define SYNC_IOC_LEGACY_FENCE_INFO _IOWR(SYNC_IOC_MAGIC, 2,\ + struct sync_fence_info_data) + +/* SW Sync API */ struct sw_sync_create_fence_data { __u32 value; |