platform_system_core/include
Hans Boehm 3e4c076ef2 Fix SharedBuffer. Remove aref.
Add comment that SharedBuffer is deprecated.

Both aref and SharedBuffer had memory ordering bugs.  Aref has no
clients.

SharedBuffer had several bugs, which are fixed here:

mRefs was declared neither volatile, not atomic, allowing the
compiler to, for example, reuse a stale previously loaded value.

It used the default android_atomic release memory ordering, which
is insufficient for reference count decrements.

It used an ordinary memory read in onlyOwner() to check whether
an object is safe to deallocate, without any attempt to ensure
memory ordering.

Comments claimed that SharedBuffer was exactly 16 bytes, but
this was neither checked, nor correct on 64-bit platforms.

This turns mRef into a std::atomic and removes the android_atomic
dependency.

Bug: 28826227
Change-Id: I39fa0b4f70ac0471b14ad274806fc4e0c0802e78
2016-05-23 17:28:52 +00:00
..
android log: Fix warning with __USE_MINGW_ANSI_STDIO 2014-06-12 13:19:51 -07:00
backtrace Add error reporting mechanism for failing Unwind. 2016-03-10 12:39:15 -08:00
binderwrapper binderwrapper: Resolve ambiguous base::Closure reference 2016-04-12 13:19:29 -07:00
cutils Fix SharedBuffer. Remove aref. 2016-05-23 17:28:52 +00:00
log Change remaining Android logging macros to use C99 varidaic syntax 2016-04-27 14:44:40 -07:00
nativebridge LibNativeBridge: Version 2 2015-05-31 16:58:24 -07:00
private Move canned_fs_config into libcutils 2016-05-12 18:44:13 -07:00
system Name the pixel format and transform enums 2015-12-17 13:58:19 -08:00
sysutils Revert "Sigh, more vendors linking against hidden APIs." 2015-03-20 23:51:36 +00:00
usbhost libusbhost: Add usb_device_get_version() 2015-04-29 13:04:10 -07:00
utils Fix memory order and race bugs in Refbase.h & RefBase.cpp 2016-05-17 16:11:11 -07:00
ziparchive Allow setting an arbitrary alignment for an entry. 2016-01-19 13:55:53 -08:00