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
This commit is contained in:
parent
4d4cc9ecc7
commit
3be33e4618
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue