diff options
Diffstat (limited to 'libion/include/ion/ion.h')
-rw-r--r-- | libion/include/ion/ion.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libion/include/ion/ion.h b/libion/include/ion/ion.h new file mode 100644 index 0000000..0451b5a --- /dev/null +++ b/libion/include/ion/ion.h @@ -0,0 +1,45 @@ +/* + * ion.c + * + * Memory Allocator functions for ion + * + * Copyright 2011 Google, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __SYS_CORE_ION_H +#define __SYS_CORE_ION_H + +#include <linux/ion.h> + +__BEGIN_DECLS + +struct ion_handle; + +int ion_open(); +int ion_close(int fd); +int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, + unsigned int flags, ion_user_handle_t *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, ion_user_handle_t handle); +int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot, + int flags, off_t offset, unsigned char **ptr, int *map_fd); +int ion_share(int fd, ion_user_handle_t handle, int *share_fd); +int ion_import(int fd, int share_fd, ion_user_handle_t *handle); + +__END_DECLS + +#endif /* __SYS_CORE_ION_H */ |