Merge "Add explicit sync call to ion library" into jb-mr1-dev

This commit is contained in:
Rebecca Schultz Zavin 2012-09-20 13:59:10 -07:00 committed by Android (Google) Code Review
commit 0d699de0fc
2 changed files with 9 additions and 0 deletions

View File

@ -31,6 +31,7 @@ int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask,
unsigned int flags, struct ion_handle **handle);
int ion_alloc_fd(int fd, size_t len, size_t align, unsigned int heap_mask,
unsigned int flags, int *handle_fd);
int ion_sync_fd(int fd, int handle_fd);
int ion_free(int fd, struct ion_handle *handle);
int ion_map(int fd, struct ion_handle *handle, size_t length, int prot,
int flags, off_t offset, unsigned char **ptr, int *map_fd);

View File

@ -146,3 +146,11 @@ int ion_import(int fd, int share_fd, struct ion_handle **handle)
*handle = data.handle;
return ret;
}
int ion_sync_fd(int fd, int handle_fd)
{
struct ion_fd_data data = {
.fd = handle_fd,
};
return ion_ioctl(fd, ION_IOC_SYNC, &data);
}