diff options
author | Serban Constantinescu <serban.constantinescu@arm.com> | 2013-11-05 16:53:55 +0000 |
---|---|---|
committer | David Butcher <david.butcher@arm.com> | 2014-01-31 10:49:40 +0000 |
commit | f683e0163a84d93448b9388126902242367cd961 (patch) | |
tree | 9b1107fef6b054470d3edef320d22ecd36461568 /include | |
parent | 3a345f0df5f62d77e875a289e9aee89f0d1b526e (diff) | |
download | frameworks_native-f683e0163a84d93448b9388126902242367cd961.zip frameworks_native-f683e0163a84d93448b9388126902242367cd961.tar.gz frameworks_native-f683e0163a84d93448b9388126902242367cd961.tar.bz2 |
Binder: Make binder portable
Changes include
- Binder attempts to cast pointers to a int datatype
which is not sufficient on a 64-bit platform.
- This patch introduces new read/write functions into
Parcel that allow pointers to be written using the
uintptr_t datatype for compile-time data type size
selection.
- Change access specifier for the methods above.
- Binder uses the 64bit android_atomic_release_cas64
(aka cmpxchg)
Change-Id: I595280541e0ba1d19c94b2ca2127bf9d96efabf1
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/binder/Parcel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index c95f297..fa13ff5 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -38,6 +38,7 @@ class TextOutput; struct flat_binder_object; // defined in support_p/binder_module.h class Parcel { + friend class IPCThreadState; public: class ReadableBlob; class WritableBlob; @@ -218,6 +219,9 @@ private: status_t growData(size_t len); status_t restartWrite(size_t desired); status_t continueWrite(size_t desired); + status_t writePointer(uintptr_t val); + status_t readPointer(uintptr_t *pArg) const; + uintptr_t readPointer() const; void freeDataNoInit(); void initState(); void scanForFds() const; |