Clang compiler warns about undefined static functions like getReturnString
before all references are removed inside IF_LOG_COMMANDS.
To remove such warnings, we can leave those static functions defined
and the compiler will remove them at the end when they are not used.
Add a cast to long before converting from int to void*,
to avoid type cast warnings on 64 bit targets.
BUG: 17043248
Change-Id: Ica31101522279d2c8eacc90e2939767002fb827b
mmap returns MAP_FAILED (which is -1) and not NULL on
failure.
Diagnosed by cferris.
bug: 17909809
Change-Id: I609788ebf94742ef88af002d2d3f3bc9b9e520ac
Temporary extra debug validation for b/17477219: a Parcel recipient is
getting a positive but invalid fd unexpectedly. Trying to track down
where it's coming from.
Debug code for bug: 17477219
Change-Id: Idb1e71621025a3928c7adc88fd44790e1abd2a01
Try to clean up the code paths coming in and out of binder IPCs to
plug any places where we could disrupt the gather flag of a thread,
causing it to keep gathering stack crawls (which is the thing that
is causing our strict mode data to become so large).
We now take care of saving and restoring this state in the core
IPC code path, not at the Java layer.
Change-Id: I73d564778da127bdce00f304225930e7f2318293
Cast away the const qualifier in BBinder::findObject. C11, unlike C++11,
does not allow loads from const atomics. This is widely regarded as
a bug (see WG14 DR 459). This is a hack to work around it until it's
officially fixed in the spec.
load_const_atomic was adapted from commit
1e8587a479fd8b1ce9b594298a93f517816e8f15
I don't think we want to dignify this by putting it into a header file.
Bug:17067219
Change-Id: Icbfcbda2722e6f80d2bb065a0bb3ec7634bcacb2
After fixing b/16874785.
This reverts commit f010a05c7e.
Original comment, which actually describes the effect of this:
Change the mExtras field in Binder.h to be a stdatomic.h atomic
value, and replace references to it with proper stdatomic.h calls.
This removes one of a small number of remaining 64 bit
android_atomic references. It also replaces the erroneously
non-atomic read accesses to mExtras.
It would be better if this used the C++11 <atomic> facility,
but we don't quite have that yet.
Fixes
Bug:16513433
Change-Id: I1645ca5d6f60595bf5d388913665ce4b8780b26d
(cherry picked from commit 3effababf2)
Change the mExtras field in Binder.h to be a stdatomic.h atomic
value, and replace references to it with proper stdatomic.h calls.
This removes one of a small number of remaining 64 bit
android_atomic references. It also replaces the erroneously
non-atomic read accesses to mExtras.
It would be better if this used the C++11 <atomic> facility,
but we don't quite have that yet.
Bug: 16513433
Change-Id: Ibabb88d05025187ee1ce6c7f1aa670b133a547f8
All uses of this API have been removed. It should
never have been made public in the first place.
bug: 15424960
Change-Id: Id07d24ec95b2b393e6da138a7e8a9a4ecebeca94
All uses of this API have been removed. It should
never have been made public in the first place.
bug: 15424960
(cherry picked from commit 7da40c0a84)
Change-Id: I8d89f62dbdaee7149ef908e0c97417b85e0c48a2