aboutsummaryrefslogtreecommitdiffstats
path: root/include/ion
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2012-02-22 16:36:55 -0800
committerRebecca Schultz Zavin <rebecca@android.com>2012-02-23 12:18:31 -0800
commitafd912394690cbf7d40b021c62d80ff0f3d40806 (patch)
tree6a180d768c4154dcc20f296b4317a43eb9b1dd20 /include/ion
parentc8ba5366da7e23ebf1cd76bcf49449b878563102 (diff)
downloadsystem_core-afd912394690cbf7d40b021c62d80ff0f3d40806.tar.gz
system_core-afd912394690cbf7d40b021c62d80ff0f3d40806.tar.bz2
system_core-afd912394690cbf7d40b021c62d80ff0f3d40806.zip
Add ion helper library
This library contains helper functions for using ion Change-Id: I7d7f76d6d3f36cd94d67797a38099a94214392b1 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'include/ion')
-rw-r--r--include/ion/ion.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/ion/ion.h b/include/ion/ion.h
new file mode 100644
index 00000000..879eab3f
--- /dev/null
+++ b/include/ion/ion.h
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#include <linux/ion.h>
+
+int ion_open();
+int ion_close(int fd);
+int ion_alloc(int fd, size_t len, size_t align, unsigned int flags,
+ struct ion_handle **handle);
+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);
+int ion_share(int fd, struct ion_handle *handle, int *share_fd);
+int ion_import(int fd, int share_fd, struct ion_handle **handle);
+