summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libutils] Modernize codebase by replacing NULL with nullptrYi Kong2018-07-161-2/+2
| | | | | | | | Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
* Remove more semicolons at the end of namespacesPirama Arumuga Nainar2018-04-121-1/+1
| | | | | | | | | | | These warnings are triggered by -Wextra-semi (and not -Weverything, as incorrectly mentioned in I49b6e6af483e011632e6a34c0663c93e5c385aa6). This warning is added to Hidl-generated libs. To appease clang-format, this patch also fixes some extra newlines. Test: Build Change-Id: I63cf5d8ecba46ad87876ff21848bfff04b12ec6e
* Fix SharedBuffer. Remove aref.Hans Boehm2016-05-231-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation ↵Sergio Giro2015-09-231-0/+137
directory Some methods in header files of classes using SharedBuffer need to be moved to the implementation files accordingly Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db