summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-04 18:51:36 +0100
committerEspen Fjellvær Olsen <espen@mrfjo.org>2012-12-11 14:04:26 +0100
commit9a3063ed1b718190845ab1326d27261a5eebfd11 (patch)
tree185caf9dd64b1f6c8bb7e1c969c58fd5404415ab /include
parenta1aa229340e805da8cbd1edaaf2e6fcb380a1070 (diff)
downloadframeworks_native-9a3063ed1b718190845ab1326d27261a5eebfd11.zip
frameworks_native-9a3063ed1b718190845ab1326d27261a5eebfd11.tar.gz
frameworks_native-9a3063ed1b718190845ab1326d27261a5eebfd11.tar.bz2
binder: Add MemoryHeapBaseIon
Source: http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/native/commit/?h=exynos-jb&id=dc4cd25cc41e4358debd0c7d1a2706d208a58df6 Change-Id: Ib06cc37a2a25c78a061ee2bad48eec2d01b07833
Diffstat (limited to 'include')
-rw-r--r--include/binder/IMemory.h3
-rw-r--r--include/binder/MemoryHeapBaseIon.h51
2 files changed, 53 insertions, 1 deletions
diff --git a/include/binder/IMemory.h b/include/binder/IMemory.h
index 2d0db00..62ac9e3 100644
--- a/include/binder/IMemory.h
+++ b/include/binder/IMemory.h
@@ -36,7 +36,8 @@ public:
// flags returned by getFlags()
enum {
- READ_ONLY = 0x00000001
+ READ_ONLY = 0x00000001,
+ USE_ION_FD = 0x00000008
};
virtual int getHeapID() const = 0;
diff --git a/include/binder/MemoryHeapBaseIon.h b/include/binder/MemoryHeapBaseIon.h
new file mode 100644
index 0000000..0fe99c7
--- /dev/null
+++ b/include/binder/MemoryHeapBaseIon.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2011, Samsung Electronics Co. LTD
+ *
+ * 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.
+ */
+/*!
+ * \file MemoryHeapBaseIon.h
+ * \brief header file for MemoryHeapBaseIon
+ * \author MinGu, Jeon(mingu85.jeon)
+ * \date 2011/11/20
+ *
+ * <b>Revision History: </b>
+ * - 2011/11/21 : MinGu, Jeon(mingu85.jeon)) \n
+ * Initial version
+ */
+
+#ifndef ANDROID_MEMORY_HEAP_BASE_ION_H
+#define ANDROID_MEMORY_HEAP_BASE_ION_H
+
+#include <binder/IMemory.h>
+#include <binder/MemoryHeapBase.h>
+#include <stdlib.h>
+
+namespace android {
+
+class MemoryHeapBaseIon : public MemoryHeapBase
+{
+public:
+ enum {
+ USE_ION_FD = IMemoryHeap::USE_ION_FD
+ };
+ MemoryHeapBaseIon(size_t size, uint32_t flags = 0, char const* name = NULL);
+ MemoryHeapBaseIon(int fd, size_t size, uint32_t flags = 0, uint32_t offset = 0);
+ ~MemoryHeapBaseIon();
+private:
+ int mIonClient;
+};
+
+};
+#endif