diff options
author | Colin Cross <ccross@android.com> | 2013-11-07 20:11:37 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2013-12-18 18:24:50 -0800 |
commit | 03c932dffa2f72ee63de24c221d07d249a6eafd3 (patch) | |
tree | c90351fdb2aa52339861983127e68b7ad0722364 /libion | |
parent | 969eac8161ba3c08bac4278451c91f3307f3f565 (diff) | |
download | system_core-03c932dffa2f72ee63de24c221d07d249a6eafd3.zip system_core-03c932dffa2f72ee63de24c221d07d249a6eafd3.tar.gz system_core-03c932dffa2f72ee63de24c221d07d249a6eafd3.tar.bz2 |
libion: move ion.h into local include directory
Export it to users of libion with LOCAL_C_EXPORT_INCLUDE_DIRS
Change-Id: I4d00a9dd2e99953723994d0304ca77e0ad50a3a9
Diffstat (limited to 'libion')
-rw-r--r-- | libion/Android.mk | 3 | ||||
-rw-r--r-- | libion/include/ion/ion.h | 45 |
2 files changed, 48 insertions, 0 deletions
diff --git a/libion/Android.mk b/libion/Android.mk index 5121fee..ae99ac5 100644 --- a/libion/Android.mk +++ b/libion/Android.mk @@ -5,11 +5,14 @@ LOCAL_SRC_FILES := ion.c LOCAL_MODULE := libion LOCAL_MODULE_TAGS := optional LOCAL_SHARED_LIBRARIES := liblog +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := ion.c ion_test.c LOCAL_MODULE := iontest LOCAL_MODULE_TAGS := optional tests +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_EXECUTABLE) 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 */ |