Commit graph

469 commits

Author SHA1 Message Date
Dan Willemsen
2e1591bef9 Convert libbacktrace, libutils to Soong
Change-Id: I8b578f671f92246aca61f98937d75a60b56bc5c6
2016-07-12 17:20:18 -07:00
Hans Boehm
12f788e763 Merge "Fix SharedBuffer. Remove aref." am: 069517574e
am: 1e081a8c5f

* commit '1e081a8c5f2d6e6cb55658bb289db1f0b4f5774a':
  Fix SharedBuffer. Remove aref.

Change-Id: I5849137bb49d727d1c1d245f0f61d11c4ee10859
2016-05-23 22:22:18 +00:00
Hans Boehm
54828dc739 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
(cherry picked from commit 3e4c076ef2)
2016-05-23 15:19:53 -07:00
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
Hans Boehm
70a46d674a Fix memory order and race bugs in Refbase.h & RefBase.cpp
Convert to use std::atomic directly.

Consistently use relaxed ordering for increments, release ordering
for decrements, and an added acquire fence when the count goes to
zero.

Fix what looks like another race in attemptIncStrong:
It seems entirely possible that the final adjustment for
INITIAL_STRONG_VALUE would see e.g. INITIAL_STRONG_VALUE + 1,
since we could be running in the middle of another initial
increment.

Attempt to somewhat document what this actually does, and
what's expected from the client. Hide the documentation in
the .cpp file for now.

Remove a confusing redundant test in decWeak. OBJECT_LIFETIME_STRONG
and OBJECT_LIFETIME_WEAK are the only options, in spite of some
of the original comments.

It's conceivable that either of these issues has resulted in
actual crashes, though I would guess the probability is small.
It's hard enough to reason about this code without the bugs.

Bug: 28705989
Change-Id: I4107a56c3fc0fdb7ee17fc8a8f0dd7fb128af9d8
(cherry picked from commit e263e6c633)
2016-05-19 16:18:26 -07:00
Hans Boehm
fdad5af164 Merge "Fix memory order and race bugs in Refbase.h & RefBase.cpp" am: 62212954ef
am: d657e639cf

* commit 'd657e639cf74e0ee5a32d0f67efe0097c3df17a1':
  Fix memory order and race bugs in Refbase.h & RefBase.cpp

Change-Id: I79106bb0399e7699d51d526235843504ab52708b
2016-05-19 22:12:01 +00:00
Hans Boehm
62212954ef Merge "Fix memory order and race bugs in Refbase.h & RefBase.cpp" 2016-05-19 22:01:41 +00:00
Hans Boehm
e263e6c633 Fix memory order and race bugs in Refbase.h & RefBase.cpp
Convert to use std::atomic directly.

Consistently use relaxed ordering for increments, release ordering
for decrements, and an added acquire fence when the count goes to
zero.

Fix what looks like another race in attemptIncStrong:
It seems entirely possible that the final adjustment for
INITIAL_STRONG_VALUE would see e.g. INITIAL_STRONG_VALUE + 1,
since we could be running in the middle of another initial
increment.

Attempt to somewhat document what this actually does, and
what's expected from the client. Hide the documentation in
the .cpp file for now.

Remove a confusing redundant test in decWeak. OBJECT_LIFETIME_STRONG
and OBJECT_LIFETIME_WEAK are the only options, in spite of some
of the original comments.

It's conceivable that either of these issues has resulted in
actual crashes, though I would guess the probability is small.
It's hard enough to reason about this code without the bugs.

Bug: 28705989
Change-Id: I4107a56c3fc0fdb7ee17fc8a8f0dd7fb128af9d8
2016-05-17 16:11:11 -07:00
Michael Wright
30a1db7045 Merge "Fix strstr16." into nyc-dev
am: a34a383607

* commit 'a34a383607007d632878929c6c9278221242d457':
  Fix strstr16.

Change-Id: I8fa1fab977f974c861cecb8b24b72cd175c27752
2016-05-17 17:28:02 +00:00
Michael Wright
0fd60eb9b4 Fix strstr16.
strcmp needs a limit, otherwise it will compare the null terminator
with the next character in the haystack, which results in the compare
failing for all searches except where the needle is found at the very
end.

Bug: 28663748
Change-Id: I1939dc4037c2f2a75d617943b063d2d38a8c5e3a
2016-05-16 21:23:07 +01:00
Greg Hackmann
1e18e78601 Merge "SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux" am: e3ff256228
am: 6d28bd81f5

* commit '6d28bd81f55236d1a82f00f8ac568ad61a03128d':
  SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux

Change-Id: Id5ecad63fb6cd79cc7db641d992e9525bc2b8779
2016-05-16 18:23:42 +00:00
Greg Hackmann
8f9a6372f6 Merge "SystemClock: add test" am: 282e8fb037
am: a91a1a990f

* commit 'a91a1a990f1d629377dcd2c3f2b57ccab48dc8cf':
  SystemClock: add test

Change-Id: I547a4c3422eb468530e3cdd02eb2bb157a444a15
2016-05-16 18:23:41 +00:00
Treehugger Robot
e3ff256228 Merge "SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux" 2016-05-16 18:18:57 +00:00
Treehugger Robot
282e8fb037 Merge "SystemClock: add test" 2016-05-16 18:18:30 +00:00
Michael Wright
2a9a993af9 Merge commit '8b452b876b90dcfff1dab9012b65b5e67c4531a4' into manual_merge_8b452b8
Change-Id: Iacdc2d521f669661b4979c03b0476512abdb37c7
2016-05-16 15:06:22 +01:00
Michael Wright
5bacef33c9 Add String16#contains and strstr16 methods.
These are needed for aapt to find javadoc comments that contain
"@removed" in order to skip them when printing styleable docs.

Bug: 28663748
Change-Id: I8866d2167c41e11d6c2586da369560d5815fd13e
2016-05-09 19:45:07 +01:00
Greg Hackmann
e94c92cd48 SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux
We've removed the Android alarm driver from our supported kernels.
clock_gettime(CLOCK_BOOTTIME) has been a viable option since 2.6.39, so
there's no need for the legacy code path anymore.

We can use this on Linux hosts too, since no one should be building
Android on hosts with kernels that old.

Bug: 28357356

Change-Id: I0aa164383c95e77c53d2c85883d83f85d4abc7b1
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-05-02 14:00:02 -07:00
Greg Hackmann
340079df26 SystemClock: add test
Bug: 28357356

Change-Id: Idf66c048bda09cd8cb08adf89ed0edd3770c4e39
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-05-02 13:59:58 -07:00
Chih-hung Hsieh
fb44ca5178 Merge "Fix google-explicit-constructor warnings." am: 7bdd6a8b5a
am: 427d8d840f

* commit '427d8d840f6ec5ce5767b2ee521e4ac5b7ebd619':
  Fix google-explicit-constructor warnings.

Change-Id: I26dc45aca83f991aa7993f6d4233e0439dd44a22
2016-04-30 05:16:35 +00:00
Chih-Hung Hsieh
1c563d96f0 Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: I4504e98a8db31e0edcbe63c23f9af43eb13e9d86
2016-04-29 15:44:04 -07:00
Elliott Hughes
7b2d2d6afa Merge "Remove debugging code for a fixed 3.6 kernel bug." am: af61acc
am: 058fd2e

* commit '058fd2edbcea9a6d224a3473fe8fdcb2f7735d37':
  Remove debugging code for a fixed 3.6 kernel bug.

Change-Id: I40ce05d262ab8e718fff4df8df7a41d2d6923e05
2016-04-09 00:31:32 +00:00
Elliott Hughes
ad19af7132 Remove debugging code for a fixed 3.6 kernel bug.
Change-Id: If17d41d6151cd7b81677afc5d341d7aa788170e4
2016-04-04 16:06:53 -07:00
Brian Carlstrom
de6d6041c1 system/core: Make Thread::run threadName argument required
am: e71b914775

* commit 'e71b9147756ab4da306e4c16461ad23936769603':
  system/core: Make Thread::run threadName argument required
2016-03-14 15:24:54 +00:00
Brian Carlstrom
e71b914775 system/core: Make Thread::run threadName argument required
Bug: 27557176
Change-Id: Iae83a1e5489c86c2858fc8481f246b8480f0eec4
2016-03-12 21:32:52 -08:00
George Burgess IV
02f689e11a Merge "Cleanup uses of sprintf so we can deprecate it." am: 2c5b89a64a
am: 3368bdebba

* commit '3368bdebba02316710bafc5bce120eec388365fb':
  Cleanup uses of sprintf so we can deprecate it.
2016-03-08 07:41:39 +00:00
George Burgess IV
e7aa2b2c83 Cleanup uses of sprintf so we can deprecate it.
Also cleans up two instances of open() with useless mode params, and
changes a few uses of snprintf to use sizeof(buffer) instead of
hardcoded buffer sizes.

Change-Id: If11591003d910c995e72ad8f75afd072c255a3c5
2016-03-07 18:40:40 -08:00
James Hawkins
650ba8b8d6 Merge "system/core/lib[c]utils: Fix signedness comparison warnings." am: bba2151b29
am: 65df16b05f

* commit '65df16b05f8d590e1fccc19e9a28833d6a71567d':
  system/core/lib[c]utils: Fix signedness comparison warnings.
2016-03-01 20:32:09 +00:00
James Hawkins
b898075f30 system/core/lib[c]utils: Fix signedness comparison warnings.
* Store the output of a length variable in size_t.
* Annotate unsigned constant values as such.

Bug: 27384813
Change-Id: I8504c0a8f5840d4d42e5c0df797a4e5d02d13eb9
2016-03-01 11:21:53 -08:00
Dan Willemsen
9dddd137c7 Fix windows 64-bit builds
pid_t is 64-bit in 64-bit mingw, but the windows process/thread
functions return a DWORD(uint32_t). Instead of promoting to a pid_t and
fixing the format strings, just use a uint32_t to store the values.

android_thread_id also cannot be a 64-bit pointer, so for windows just
force it to be a uint32_t.

libutils/ProcessCallStack only works under Linux, since it makes heavy
use of /proc. Don't compile it under Windows or Darwin.

Bug: 26957718

(cherry picked from commit 86cf941c48)

Change-Id: I8d39d1951fea1b3011caf585c983e1da7959f7c0
2016-02-25 18:43:55 -08:00
Dimitry Ivanov
ca0c8ce614 Merge "Make libutils symbols protected" into nyc-dev
am: aa2cf3facf

* commit 'aa2cf3facf8d26a3642c90cbf5b83e18934da48c':
  Make libutils symbols protected
2016-02-25 21:10:24 +00:00
Dimitry Ivanov
96ccb85fa2 Make libutils symbols protected
This change is a workaround for apps linking
libutils statically and dynamically which causes
them to crash for newer version of Android.

Bug: http://b/27313399
Change-Id: I47ac4146041b6eeef03cb605ea436719d552ec8f
(cherry picked from commit 2c7960c8d9)
2016-02-25 13:09:40 -08:00
Dimitry Ivanov
2c7960c8d9 Make libutils symbols protected
This change is a workaround for apps linking
libutils statically and dynamically which causes
them to crash for newer version of Android.

Bug: http://b/27313399
Change-Id: I47ac4146041b6eeef03cb605ea436719d552ec8f
2016-02-25 11:44:35 -08:00
James Hawkins
22b6f7a559 resolve merge conflicts of 0f5d443d0c to nyc-dev-plus-aosp
Change-Id: I850bda0808ae17ade5bc0e667211a599d284d6e3
2016-02-19 11:10:30 -08:00
James Hawkins
bd04bb0d29 Merge "system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr." 2016-02-19 17:49:13 +00:00
Samuel Tan
cf1649da00 Merge "libutils: add String8 and String16 std_string utility methods" am: fb0670d650
am: 941d48f0ee

* commit '941d48f0eeb98fac7c869beee22833ff659318bc':
  libutils: add String8 and String16 std_string utility methods
2016-02-19 04:49:17 +00:00
Samuel Tan
4b2e76966e Merge "libutils: remove whitespace from String8 files" am: e771e846a8
am: 450b9b7068

* commit '450b9b7068cac286ca442c404a90a8a8b57a79e8':
  libutils: remove whitespace from String8 files
2016-02-19 04:49:08 +00:00
Samuel Tan
9ac4e005b4 libutils: add String8 and String16 std_string utility methods
Add utility methods that convert String16 and String8 into
std::string.

Also, remove a repeated include of <utils/Unicode.h> in
String16.h, since it is not used in that header file,
and is already included in String16.cpp.

BUG: 27200800
Change-Id: I5238aeb70689499763060a99dff9950fbb7adb3e
TEST: libutils builds successfully.
2016-02-18 17:04:23 -08:00
Samuel Tan
95fd527065 libutils: remove whitespace from String8 files
Remove trailing whitespace from String8 header and
cpp files.

BUG: None
Change-Id: Ie77da3f0fbce9cdce20225ce1310cf62295179a4
2016-02-18 17:04:20 -08:00
James Hawkins
588a2cad7f system/core: Cleanup direct calls to opendir by containing in a
std::unique_ptr.

Bug: 26643633
Change-Id: Ia3491fdbff086558da694ae949cf08e4c89d0307
2016-02-18 14:52:46 -08:00
Samuel Tan
9518b9db5b Merge "libutils: remove whitespaces in String16.cpp and String16.h"
am: 8c09555aac

* commit '8c09555aac6f00cb7fa7d62cb5c356e2f07a268b':
  libutils: remove whitespaces in String16.cpp and String16.h
2016-02-17 00:38:10 +00:00
Samuel Tan
f9d16ef106 libutils: remove whitespaces in String16.cpp and String16.h
Remove trailing whitespaces in both these files.

BUG: None
Change-Id: I18eca5162871b5b2bf7757a7ef36a4e80073798c
2016-02-16 15:21:34 -08:00
Dan Willemsen
cf1381c834 Merge "Fix windows 64-bit builds"
am: 3f68ba4dc6

* commit '3f68ba4dc67360d4c242110005e36bfe65c66098':
  Fix windows 64-bit builds
2016-02-08 23:59:59 +00:00
Dan Willemsen
86cf941c48 Fix windows 64-bit builds
pid_t is 64-bit in 64-bit mingw, but the windows process/thread
functions return a DWORD(uint32_t). Instead of promoting to a pid_t and
fixing the format strings, just use a uint32_t to store the values.

android_thread_id also cannot be a 64-bit pointer, so for windows just
force it to be a uint32_t.

libutils/ProcessCallStack only works under Linux, since it makes heavy
use of /proc. Don't compile it under Windows or Darwin.

Bug: 26957718
Change-Id: I4e43e7cf18a96f22b3a9a08dbab8c3e960c12930
2016-02-05 16:10:10 -08:00
Nick Kralevich
261952e570 Merge "more O_CLOEXEC" am: 920d637d25
am: 890cd99709

* commit '890cd997098795b7a58c1d56c49c23895da7b4f9':
  more O_CLOEXEC
2015-12-18 23:05:34 -08:00
Nick Kralevich
c68c8862f9 more O_CLOEXEC
Change-Id: I330aef8d6f1fc35d6649995ef312954b84dff555
2015-12-18 20:57:25 -08:00
Sergio Giro
43f13d0d68 Merge "libutils: fix cache removal when callback invalidates the key" am: b0df9dca7c am: e483305e47
am: a96cd36afb

* commit 'a96cd36afbff682e24365092dd85bbe9c9165afc':
  libutils: fix cache removal when callback invalidates the key
2015-11-20 17:17:38 +00:00
Sergio Giro
b7170fe3fe libutils: fix cache removal when callback invalidates the key
Bug: 24785286
Change-Id: I9d17d2247258a56ef7776b3a701389e825a9c533
2015-11-20 14:54:51 +00:00
Dan Albert
8f3ef3fd09 Merge "Use std::unique_ptr instead of UniquePtr." am: 0f61f86870 am: 0c69e9f271
am: 40f76c2fed

* commit '40f76c2fedb18664adab73e40b8b64227601d4e6':
  Use std::unique_ptr instead of UniquePtr.
2015-11-05 21:11:03 +00:00
Dan Albert
f2d2509690 Use std::unique_ptr instead of UniquePtr.
Bug: http://b/22403888
Change-Id: I398fa43b8f33c9281d7ff238521d75f1dcb8a5e7
2015-11-05 01:09:22 -08:00
John Reck
dc7694eac5 Merge "Teach sp<> how to std::move" am: 518d043c86 am: bb12b91ae1
am: a573d6b186

* commit 'a573d6b18686266667c8efd9d7291ecd28efa67c':
  Teach sp<> how to std::move
2015-11-03 00:14:15 +00:00
John Reck
bb12b91ae1 Merge "Teach sp<> how to std::move"
am: 518d043c86

* commit '518d043c8693835061b02ecbbee4b82fc61a776e':
  Teach sp<> how to std::move
2015-11-02 21:39:24 +00:00
John Reck
d69089a742 Teach sp<> how to std::move
Arguably we should migrate to std::shared_ptr
but for now make std::vector<sp<>> a bit less
horrible

Change-Id: Ia458a2daff0b656b2f3310b3ea100565ec844c69
2015-10-29 07:17:40 -07:00
Andy Hung
6db2d260b2 Merge "Disable sanitization for LinearTransform" am: c52b3c08fa am: 0d3b144372
am: eb1adff81e

* commit 'eb1adff81e8d7752248c42c4dcb525ec085853e1':
  Disable sanitization for LinearTransform
2015-10-22 19:50:52 +00:00
Andy Hung
0d3b144372 Merge "Disable sanitization for LinearTransform"
am: c52b3c08fa

* commit 'c52b3c08fa5ea3680ffcd68c2a1d0542d09f0509':
  Disable sanitization for LinearTransform
2015-10-22 19:46:20 +00:00
Andy Hung
13c19e7703 Disable sanitization for LinearTransform
Avoids potential crash on Fugu.

Bug: 25160007
Change-Id: I2e883539e36204821f3eb97f0ae4a4854014f048
2015-10-22 11:20:45 -07:00
Sergio Giro
d155004e78 am 51209a8b: am 9443fd94: am f8376607: Merge "system/core: fix iterator for LruCache"
* commit '51209a8b93d85f8b7f3b6a106c41c1aa03190f2c':
  system/core: fix iterator for LruCache
2015-10-13 07:45:36 +00:00
Sergio Giro
9443fd94e3 am f8376607: Merge "system/core: fix iterator for LruCache"
* commit 'f83766079e248e04065103a4720364c0193777ee':
  system/core: fix iterator for LruCache
2015-10-13 07:36:52 +00:00
Sergio Giro
0cb59c0dce system/core: fix iterator for LruCache
Was failing to return the first element

Change-Id: Ic803f5d463a56519212014d0d190407cf4b859cf
2015-10-12 16:13:44 +01:00
Adam Lesinski
7e59e17474 am 0b2bce06: am bda375fa: am c6c6ab50: Merge "Implement C++11 move semantics for android::FileMap"
* commit '0b2bce06382b5517a4dba33da5328c751f2c7a3e':
  Implement C++11 move semantics for android::FileMap
2015-10-02 01:31:53 +00:00
Adam Lesinski
0b2bce0638 am bda375fa: am c6c6ab50: Merge "Implement C++11 move semantics for android::FileMap"
* commit 'bda375fa41c88e6b2f81a8cd88fc5fdda62bc723':
  Implement C++11 move semantics for android::FileMap
2015-10-02 01:25:31 +00:00
Adam Lesinski
bda375fa41 am c6c6ab50: Merge "Implement C++11 move semantics for android::FileMap"
* commit 'c6c6ab50bc11d55f3135312ceccbcf0c400b437e':
  Implement C++11 move semantics for android::FileMap
2015-10-02 01:19:25 +00:00
Sergio Giro
a5f71e075a system/core: remove BasicHashtable
Towards deprecation of SharedBuffer

Change-Id: Id6d1c8637583df38b6f28398b6804d9c1e96472a
(cherry picked from commit f84a4906fa)
2015-10-01 13:18:13 -07:00
Adam Lesinski
6f8885bc14 Implement C++11 move semantics for android::FileMap
FileMaps should be movable, thereby not requiring them to be only used
with a unique_ptr as they currently are.

Change-Id: I0fb8013bf398a2ced5420d85ba888c2a7fc5a496
2015-10-01 12:47:49 -07:00
Sergio Giro
3412280cbc resolved conflicts for 075f690d to master
Change-Id: I35b870a1e43b9a4b9f09ecabee68c54f993b036f
2015-10-01 20:21:56 +01:00
Sergio Giro
075f690dae am bdae9bf2: resolved conflicts for 70808827 to stage-aosp-master
* commit 'bdae9bf2ec3bbf8e33a34caa412bd8fd7bc2d434':
  system/core: remove BasicHashtable
2015-10-01 18:59:59 +00:00
Sergio Giro
bdae9bf2ec resolved conflicts for 70808827 to stage-aosp-master
Change-Id: I2de8a63fa5be5423846df4c2e8ccc5f12e843f09
2015-10-01 19:49:22 +01:00
Sergio Giro
45dd164bff Revert "resolved conflicts for 70808827 to stage-aosp-master"
This reverts commit 5cf2d5c9cc.

Change-Id: Ifcffff034d4610c0d318cf67b0d98a28551c9605
2015-10-01 18:33:25 +00:00
Sergio Giro
5cf2d5c9cc resolved conflicts for 70808827 to stage-aosp-master
Change-Id: I5e5030a20f2be3bd15b9fec8192dd22ec5a34d87
2015-10-01 18:54:33 +01:00
Sergio Giro
f84a4906fa system/core: remove BasicHashtable
Towards deprecation of SharedBuffer

Change-Id: Id6d1c8637583df38b6f28398b6804d9c1e96472a
2015-10-01 11:44:47 +01:00
Sergio Giro
58a25053c6 am c559a9b5: am b5a00d6b: am e0453334: Merge "system/core: remove methods returning SharedBuffer in String8, String16"
* commit 'c559a9b52fe79c5be32121f8f82c672a5eac94ef':
  system/core: remove methods returning SharedBuffer in String8, String16
2015-09-30 20:20:21 +00:00
Sergio Giro
c559a9b52f am b5a00d6b: am e0453334: Merge "system/core: remove methods returning SharedBuffer in String8, String16"
* commit 'b5a00d6b2e9a386701cf9f3f5997837496a5aa57':
  system/core: remove methods returning SharedBuffer in String8, String16
2015-09-30 20:11:38 +00:00
Sergio Giro
b5a00d6b2e am e0453334: Merge "system/core: remove methods returning SharedBuffer in String8, String16"
* commit 'e045333445ab3ebb8d602d25ed750169f135baa6':
  system/core: remove methods returning SharedBuffer in String8, String16
2015-09-30 20:04:50 +00:00
Sergio Giro
0e7fb13d57 libutils: fix compile error in SharedBufferTest
Change-Id: Ib1185d417457d03efa102989a64b5b5e4eb5c82a
2015-09-30 10:44:17 -07:00
Sergio Giro
e045333445 Merge "system/core: remove methods returning SharedBuffer in String8, String16" 2015-09-30 15:21:48 +00:00
Sergio Giro
282efae9c3 system/core: remove methods returning SharedBuffer in String8, String16
Towards deprecation of SharedBuffer

Change-Id: I3069837db32837bcc0f5d8f1118ccd502c9070dc
2015-09-30 15:42:02 +01:00
Sergio Giro
9428978318 am fbb259e8: am 8e2c8208: am 730fdbb1: Merge "system/core: change LruCache to use unordered_set instead of BasicHashTable"
* commit 'fbb259e83633c35c5e6ede1d5f55f5672ab433d0':
  system/core: change LruCache to use unordered_set instead of BasicHashTable
2015-09-30 13:31:45 +00:00
Sergio Giro
fbb259e836 am 8e2c8208: am 730fdbb1: Merge "system/core: change LruCache to use unordered_set instead of BasicHashTable"
* commit '8e2c8208198c1c73c7192b1bd5e87868b53297c6':
  system/core: change LruCache to use unordered_set instead of BasicHashTable
2015-09-30 13:26:23 +00:00
Sergio Giro
8e2c820819 am 730fdbb1: Merge "system/core: change LruCache to use unordered_set instead of BasicHashTable"
* commit '730fdbb1ca4c39a4d69868f7a261b023f2bea296':
  system/core: change LruCache to use unordered_set instead of BasicHashTable
2015-09-30 13:20:02 +00:00
Sergio Giro
bb58cde899 system/core: change LruCache to use unordered_set instead of BasicHashTable
Towards deprecation of BasicHashTable

Change-Id: I3f3d904636a85a794cccf972f6e4a94e7f3808f5
2015-09-30 13:48:30 +01:00
Sergio Giro
21ca798137 resolved conflicts for 8dba9a7b to master
Change-Id: I314e3fc4dffbff1f7030533a821696692d03b33d
2015-09-23 22:03:30 +01:00
Sergio Giro
8dba9a7bf1 libutils: fix compile error in SharedBufferTest
Change-Id: Ib1185d417457d03efa102989a64b5b5e4eb5c82a
2015-09-23 21:22:14 +01:00
Sergio Giro
fa2f9d603c am c565bdb6: am f777655d: resolved conflicts for 6ee734cf to stage-aosp-master
* commit 'c565bdb67b801fe2b4965b44e53dccfd9097993c':
  libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
2015-09-23 19:50:33 +00:00
Sergio Giro
c565bdb67b am f777655d: resolved conflicts for 6ee734cf to stage-aosp-master
* commit 'f777655d85af3aefa4a1683f289da1ec67988330':
  libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
2015-09-23 17:15:12 +00:00
Sergio Giro
f777655d85 resolved conflicts for 6ee734cf to stage-aosp-master
Change-Id: Ia06c4d941d9b8828707299bb363f51fab5549897
2015-09-23 17:58:25 +01:00
Sergio Giro
d2529f2830 libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
Some methods in header files of classes using SharedBuffer need
to be moved to the implementation files accordingly

Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db
2015-09-23 16:22:59 +01:00
Brian Carlstrom
7ae1d6590b am 16bed965: am 742d0173: am 661600dd: am 110f705e: resolved conflicts for 832a0d1c to mnc-dev
* commit '16bed9650aa493194b4091700ac81c9c882d96b2':
  libutils: Fix integer overflows in VectorImpl.
2015-09-20 01:25:14 +00:00
Brian Carlstrom
16bed9650a am 742d0173: am 661600dd: am 110f705e: resolved conflicts for 832a0d1c to mnc-dev
* commit '742d0173e8bd41e137d175c04860c532270b3f5b':
  libutils: Fix integer overflows in VectorImpl.
2015-09-20 01:21:47 +00:00
Brian Carlstrom
110f705e10 resolved conflicts for 832a0d1c to mnc-dev
Change-Id: Ic46ee60de7bc500f4e1d5fe841524db80918a8d9
2015-09-19 17:29:42 -07:00
Brian Carlstrom
832a0d1c64 resolved conflicts for cf676a86 to lmp-mr1-ub-dev
Change-Id: Ifd9a44777a472ae893f894391bff7ef81456d92c
2015-09-19 16:13:00 -07:00
Narayan Kamath
419e6c3c68 libutils: Fix integer overflows in VectorImpl.
Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

(cherry picked from commit c609c31fb5)

Change-Id: I61644633db6b54fa230683615de9724f7fabf6fb
2015-09-09 12:05:06 +01:00
Narayan Kamath
69b9a8bf21 am 51e740f8: resolved conflicts for 32d86587 to mnc-dr-dev-plus-aosp
* commit '51e740f802083cc250a2f6228222bcbbcec79887':
  libutils: Fix integer overflows in VectorImpl.
2015-09-08 13:07:52 +00:00
Narayan Kamath
51e740f802 resolved conflicts for 32d86587 to mnc-dr-dev-plus-aosp
Change-Id: I381133e7dd93f908bd3d2b42e8af83d954e428af
2015-09-08 13:59:49 +01:00
Sergio Giro
df5151d30f libutils: add test for String8
Test crashes with SIGSEGV without the fix in b/23290056, passes otherwise.

Bug: 23290056
Change-Id: I6daca0aa07b5e97b004a9606a0227227fae11896
2015-09-07 17:12:45 +01:00
Dan Willemsen
c91a974e2e am 54afdbae: am a4b8f9f1: am bfe32228: Merge "Remove USE_MINGW/CYGWIN; Whitelist windows modules"
* commit '54afdbaef79c7265395d0b84f54c96c7c9f11322':
  Remove USE_MINGW/CYGWIN; Whitelist windows modules
2015-09-03 02:25:35 +00:00
Dan Willemsen
a4b8f9f1c2 am bfe32228: Merge "Remove USE_MINGW/CYGWIN; Whitelist windows modules"
* commit 'bfe322285fdbe86fdc01fdc4c711e22e894bdaee':
  Remove USE_MINGW/CYGWIN; Whitelist windows modules
2015-09-03 00:39:19 +00:00
Dan Willemsen
87a419c8b1 Remove USE_MINGW/CYGWIN; Whitelist windows modules
CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.

Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
2015-09-02 17:10:35 -07:00
Narayan Kamath
c609c31fb5 libutils: Fix integer overflows in VectorImpl.
Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
2015-09-02 12:37:49 +01:00
Nick Kralevich
63e5142283 am 6b86f3fe: am 5e44f5cc: am 2c58af52: Merge "VectorImpl.cpp: fix benign multiplication overflow"
* commit '6b86f3fe304c7aa4f2c629a1cacd84428aad9a3e':
  VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:46:51 +00:00
Nick Kralevich
5e44f5cc0c am 2c58af52: Merge "VectorImpl.cpp: fix benign multiplication overflow"
* commit '2c58af52232f0c8b4ab09d75eba66d1283805cab':
  VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:28:37 +00:00
Nick Kralevich
c76698f24e VectorImpl.cpp: fix benign multiplication overflow
j is a ssize_t, which can go negative. If it goes negative,
the resulting multiplication of mItemSize*j doesn't make
any sense. Since the value is never used, just don't perform
the calculation if j < 0.

Bug: 23607865
Change-Id: I14f6f6506645d582f7d67a2e2d60ead3cb18b957
2015-08-28 06:40:23 -07:00
Abhishek Arya
09f2d36e1d am 5b33306d: Merge "libutils: fix overflow in SharedBuffer [DO NOT MERGE]" into mnc-dev
* commit '5b33306dba456ec906f7c9bd522681c1de137f78':
  libutils: fix overflow in SharedBuffer [DO NOT MERGE]
2015-08-26 20:12:44 +00:00
Bart Sears
170bde83ae resolved conflicts for merge of 7c327194 to lmp-mr1-ub-dev
Change-Id: I236367bd60046ba06669cbcdae81184f9d0a74c7
2015-08-26 12:59:28 -07:00
Sergio Giro
d95e47f136 libutils: fix overflow in SharedBuffer [DO NOT MERGE]
See
https://code.google.com/p/android/issues/detail?id=181910

Bug: 22952485
(cherry picked from commit 66b6eb9490)

Change-Id: I363f49b5b3c6b7b3ac08cba2c14d72c431588c5a
2015-08-25 17:40:47 +01:00
Sergio Giro
0cc9a6e6e1 libutils: fix overflow in SharedBuffer [DO NOT MERGE]
See
https://code.google.com/p/android/issues/detail?id=181910

Bug: 22952485
(cherry picked from commit 66b6eb9490)

Change-Id: Ic71dd0025b9a7588c4f3bb1c7be1bd13d2ff5105
2015-08-25 16:18:16 +01:00
Nick Kralevich
223286e396 am b37862e4: am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
* commit 'b37862e4988f90fdbc3e2e48dd72368690579d6d':
  libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 23:40:16 +00:00
Nick Kralevich
b37862e498 am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
* commit '7ec4c228ee9d50d16306331abacb607bc70fadd8':
  libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 21:51:14 +00:00
Nick Kralevich
2bcb9221d4 am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
* commit '7ec4c228ee9d50d16306331abacb607bc70fadd8':
  libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 21:51:09 +00:00
Nick Kralevich
4d587f2f9a libutils: Enable LOCAL_SANITIZE := integer
Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.

Change-Id: I475e5e9fb04160dd2d201e926ab2b897539f8bb6
2015-08-24 10:51:38 -07:00
Nick Kralevich
58e3d3e627 am 567bb226: am 4f0a7cb8: am 786e5e26: Merge "libutils: cleanups for -fsanitize=integer"
* commit '567bb2265039097d8fe272240596b12af35468c4':
  libutils: cleanups for -fsanitize=integer
2015-08-24 16:27:12 +00:00
Nick Kralevich
567bb22650 am 4f0a7cb8: am 786e5e26: Merge "libutils: cleanups for -fsanitize=integer"
* commit '4f0a7cb8e15ce50f7da6a71c96335bd0b7394492':
  libutils: cleanups for -fsanitize=integer
2015-08-24 16:02:51 +00:00
Nick Kralevich
50659902d2 am 4f0a7cb8: am 786e5e26: Merge "libutils: cleanups for -fsanitize=integer"
* commit '4f0a7cb8e15ce50f7da6a71c96335bd0b7394492':
  libutils: cleanups for -fsanitize=integer
2015-08-24 16:02:36 +00:00
Nick Kralevich
1f28698998 libutils: cleanups for -fsanitize=integer
* Hashing functions rely on integer overflow behavior.
Mark those functions as safe.

* abort() if a passed in size_t value is greater than
UINT32_MAX. This can occur on 64 bit builds where size_t
is larger than uint32_t.

* Special case the index lookup for an empty sorted vector.
Without the special case, size() == 0, and size()-1 underflows.

Change-Id: I343a14b589fc8f0d221c1998ae5d6f0b9e2781f8
2015-08-24 15:52:22 +00:00
Sergio Giro
7987b83553 libutils: fix overflow in SharedBuffer
See
https://code.google.com/p/android/issues/detail?id=181910

Bug: 22952485
Change-Id: Idcc7e581a69436c8a623659fbd9add9e5f0d4c74
2015-08-21 14:17:32 +01:00
Abhishek Arya
d1a6188e8c am a77a0487: am 219a006f: am fc5fdc85: am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'a77a0487525df3add570605e58a7eb3a03eca6a8':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:40:02 +00:00
Abhishek Arya
64e2d8c0dc am 219a006f: am fc5fdc85: am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit '219a006f89a5448a9a6eeb1f37ad0088e85bd3f8':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:12:31 +00:00
Abhishek Arya
219a006f89 am fc5fdc85: am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'fc5fdc85683f87c42d5ce7bcee4e2b70ef0acdd0':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:05:07 +00:00
Abhishek Arya
fc5fdc8568 am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'e45d96d6bf592f0ae20bb021ea529acc94e0cb55':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:54:21 +00:00
Abhishek Arya
d34846b70b am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'cd407a17fe326f3e18866ddddb1c747b06a45fc0':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:23:50 +00:00
Abhishek Arya
cd407a17fe am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'e0dce90b0de2b2b7c2baae8035f810a55526effb':
  Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:18:47 +00:00
Abhishek Arya
e0dce90b0d Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
Bug: 23290056
Change-Id: If6e22b0159de6635a8ca5305895b7718f15becc7
2015-08-20 21:55:55 -07:00
Sergio Giro
93f106b8d0 am e97682be: am a1a22b57: am e67b5848: am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit 'e97682be0634fe773f70097bc518e5d034efe8f7':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:58:19 +00:00
Sergio Giro
e67b584869 am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit '4956c0fe1e582a8497aff34a41aeb8bf4748eef0':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:28:53 +00:00
Sergio Giro
4956c0fe1e am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
* commit '5b85b1d40d619c2064d321364f212ebfeb6ba185':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:23:47 +00:00
Sergio Giro
5b85b1d40d libutils: fix overflow in String8::allocFromUTF8
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908

Bug: 23290056

(cherry picked from commit 4eeacbeec0)

Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
(cherry picked from commit ebabef2752)
2015-08-18 20:52:25 +00:00
Sergio Giro
c4abbcbdde am f468d1e1: am 1d44be87: Merge "libutils: fix overflow in String8::allocFromUTF8"
* commit 'f468d1e14c0bb777d557a6a86dead260e40ff8aa':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-18 17:25:33 +00:00
Sergio Giro
ba71601aac am 29c12755: Merge "libutils: fix overflow in String8::allocFromUTF8" into mnc-dev
* commit '29c1275519ef85fa3f30be351f19dc6e7eedbee9':
  libutils: fix overflow in String8::allocFromUTF8
2015-08-18 17:19:10 +00:00
Sergio Giro
ebabef2752 libutils: fix overflow in String8::allocFromUTF8
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908

Bug: 23290056

(cherry picked from commit 4eeacbeec0)

Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-18 18:06:38 +01:00
Sergio Giro
1d44be87ff Merge "libutils: fix overflow in String8::allocFromUTF8" 2015-08-18 17:04:07 +00:00
Sergio Giro
4eeacbeec0 libutils: fix overflow in String8::allocFromUTF8
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908

Bug: 23290056
Change-Id: Ide0e9a8acc4e95a9104bab3ae803aa3a40098222
2015-08-18 14:44:54 +01:00
Nick Kralevich
eec5baa0f7 am 77b9868a: am 6d814037: Merge "libutils: fix signed/unsigned comparison warnings"
* commit '77b9868af9313ab5b7f62d7fea709dbfb519dd2c':
  libutils: fix signed/unsigned comparison warnings
2015-08-18 04:16:13 +00:00
Nick Kralevich
a0683307e7 am 77b9868a: am 6d814037: Merge "libutils: fix signed/unsigned comparison warnings"
* commit '77b9868af9313ab5b7f62d7fea709dbfb519dd2c':
  libutils: fix signed/unsigned comparison warnings
2015-08-18 04:15:23 +00:00
Nick Kralevich
3e6c451908 libutils: fix signed/unsigned comparison warnings
Change-Id: Ib283c85a404a20688c5357fa513e5d07c2f42803
2015-08-17 20:54:15 -07:00
Elliott Hughes
5ec940aed8 am fb1ecbc5: am e6e71608: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
  Use __ANDROID__ instead of HAVE_ANDROID_OS.
2015-07-30 16:50:27 +00:00
Elliott Hughes
145afc2cc4 am fb1ecbc5: am e6e71608: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
  Use __ANDROID__ instead of HAVE_ANDROID_OS.
2015-07-30 16:50:15 +00:00
Elliott Hughes
e6e71608bd Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS." 2015-07-30 16:34:47 +00:00
Elliott Hughes
9b828adfad Use __ANDROID__ instead of HAVE_ANDROID_OS.
Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
2015-07-30 09:33:43 -07:00
Elliott Hughes
bb9c0a0031 am 42dbc4b1: am 44443bea: Merge "Use _WIN32 rather than HAVE_WINSOCK."
* commit '42dbc4b1859fe4de16b19e9b74324b345c5fcb9d':
  Use _WIN32 rather than HAVE_WINSOCK.
2015-07-30 15:17:38 +00:00
Elliott Hughes
c6dbc85845 am 42dbc4b1: am 44443bea: Merge "Use _WIN32 rather than HAVE_WINSOCK."
* commit '42dbc4b1859fe4de16b19e9b74324b345c5fcb9d':
  Use _WIN32 rather than HAVE_WINSOCK.
2015-07-30 15:17:07 +00:00
Elliott Hughes
adbf442a51 Use _WIN32 rather than HAVE_WINSOCK.
Change-Id: I9855b6fe72e2f2f3a8360c0993a67cb988024ee4
2015-07-29 17:45:24 -07:00
Elliott Hughes
2c1917f156 am 34c92f46: am fc2f1e61: Merge "Move libutils off AndroidConfig.h."
* commit '34c92f4652651697a7de7fa10c214afed9a6658a':
  Move libutils off AndroidConfig.h.
2015-07-30 00:16:18 +00:00
Elliott Hughes
92a3d2ba32 am 34c92f46: am fc2f1e61: Merge "Move libutils off AndroidConfig.h."
* commit '34c92f4652651697a7de7fa10c214afed9a6658a':
  Move libutils off AndroidConfig.h.
2015-07-30 00:15:35 +00:00
Elliott Hughes
1f8bc86a7d Move libutils off AndroidConfig.h.
Change-Id: Ia0e4a4f968c640eb44317821d2dc6b195f9f490e
2015-07-29 14:31:54 -07:00
Elliott Hughes
5b8ff09578 resolved conflicts for merge of b40ebc54 to mnc-dev-plus-aosp
Change-Id: I9da05b46da2326ae21d164b137be57a9b5220f7b
2015-06-30 15:17:14 -07:00
Elliott Hughes
6ed68cc412 Consistently use strerror in libutils.
It's easier for people to debug, and side-steps the problem that errno
values differ between architectures.

Bug: http://b/17458391
Change-Id: I1db9b2cbb653839d3936b91e37e5cff02671318a
2015-06-30 10:41:15 -07:00
Evgenii Stepanov
fc21508615 am 3c90808d: am c1c7f457: Merge "Add a space before :=."
* commit '3c90808d6d257d75d5ebd64af5d0374aa4f03cb4':
  Add a space before :=.
2015-06-13 02:25:34 +00:00
Evgenii Stepanov
6aaf740834 Add a space before :=.
Change-Id: Ib1d94648cdc163675ac7b6acf86408d5be6b5ad2
2015-06-12 14:18:33 -07:00
Jeff Brown
20432c237c Merge "Work around spurious epoll notifications." into mnc-dev 2015-05-30 00:43:10 +00:00
Jeff Brown
18a574f715 Work around spurious epoll notifications.
Sometimes it seems like we can get into a situation where we are
unable to remove an fd from the epoll set but it keeps sending us
events anyhow.  Defensively rebuild the epoll set in this case
to prevent us from spinning forever.

Bug: 21271428
Change-Id: I5607e565f2e12460d7113a1f62a70d38d334e271
2015-05-29 17:40:25 -07:00
Michael Lentine
6078805023 Adding a build id check to blob cache.
Add a build id field to the header structure in blob cache. Add build
id support with reading and writing the cache. When the cache gets
written it writes the build id at the end of the header. When read it
checks to see if there is a match between the current version and the
version in the cache. If not, it invalidates the cache which would
typically only occur during an ota update.  Also remove blob cache
from the host build.

bug: 18262905

Change-Id: I753b1de1986703a4c1c8691b9d2bb533b2546143
2015-05-18 13:14:32 -07:00
John Reck
52fc3e9aa8 Move LinearAlloc to libhwui
Change-Id: I83a70959ed0dcab2237faaf1dddc02b5eb0363c9
2015-04-23 15:07:54 -07:00
Elliott Hughes
c72bd16ce8 am 8d2cd035: am 2ddb9cb1: am ed43be39: Merge "Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it\'s not needed."
* commit '8d2cd03547c76f6c670b33d4fe6d44b646c14b45':
  Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
2015-04-02 22:07:16 +00:00
Elliott Hughes
bcc2b5f44a Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
2015-04-02 14:31:07 -07:00
Tim Kilbourn
8892ce6383 Use eventfd instead of pipe in Looper.
Bug: 19933224
Change-Id: I6611e918db960bbb0e74f8308e10bdf79510b899
2015-03-27 09:15:43 -07:00
Dan Albert
a83ba64a23 Revert "Revert "Create libbase.""
This reverts commit a7870d8816.

(cherry picked from commit c007bc3856)
2015-03-16 13:48:07 -07:00
Dan Albert
c007bc3856 Revert "Revert "Create libbase.""
This reverts commit a7870d8816.
2015-03-16 10:08:46 -07:00
Nicolas Geoffray
a6000e81dc am 90a968f0: am dd581695: Merge "Revert "Create libbase.""
* commit '90a968f0e3fb903aad41f6689c337a7e4a8d5c7b':
  Revert "Create libbase."
2015-03-16 11:25:38 +00:00
Nicolas Geoffray
a7870d8816 Revert "Create libbase."
Breaks internal master.

This reverts commit 98ff77204c.

Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
2015-03-16 11:07:29 +00:00
Dan Albert
06d60af714 am 517f65da: am a68c8148: Merge "Create libbase."
* commit '517f65daef177d06d7835300a1c23ce3409c0643':
  Create libbase.
2015-03-15 22:33:53 +00:00
Dan Albert
98ff77204c Create libbase.
Move StringPrintf and the string based file I/O from libutils to
libbase.

Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
2015-03-14 16:36:18 -07:00
Jeff Brown
e7d54f80cb Fix issues related to removing Looper callbacks after close.
When a file descriptor is closed before removing it from the
epoll set, it will normally be removed automatically from the
epoll set by the kernel.  However if there exists a duplicate
then the original file descriptor may remain in the set and
continue to receive events until all duplicates have been closed.

Unfortunately due to kernel limitations we need to rebuild the epoll
set from scratch because it may contain an old file handle that we are
now unable to remove since its file descriptor is no longer valid.
No such problem would have occurred if we were using the poll system
call instead, but that approach carries others disadvantages.

Bug: 19715279
Change-Id: If1ab8ebda0825755a416d513e888942a02ee3948
2015-03-12 19:44:49 -07:00
Jeff Brown
7a0310ef67 Fixed subtle bugs related to file descriptor recycling.
Added code to protect against situations that may occur when a
Looper callback has the side-effect of closing the file descriptor that
it is watching before it returns.  This code pattern is very
convenient for implementation but it does expose issues in how
the list of callbacks is maintained.  In particular, we
need to watch out for file descriptors which have been reused.

This change may resolve previously unexplained ANRs associated with
log messages such as: "Error modifying epoll events for fd 44, errno=2"

Bug: 10349083
Change-Id: I20eedf6ffbdeda382653ca0104962505194741b0
2015-03-11 15:00:36 -07:00
Jeff Brown
27e5721860 Rename Looper::isIdling() to isPolling() to resolve confusion.
The loop isn't technically idle at this time, it's just checking
whether any file descriptors have pending events.  However it's
still a good signal as to whether the loop is alive.

Bug: 19532373
Change-Id: I555c473e70ffd8a56e1b10aa60026eb674a16de9
2015-03-11 15:00:36 -07:00
Narayan Kamath
6832a7a4e0 Remove useless refCounting from FileMap.
Nobody ever called acquire() so release() was always
equivalent to delete. Just use delete instead so that
people can use unique_ptr directly (or shared_ptr if
they really want refcounts).

Change-Id: I9e3ad5e0f6a4fcc4e02e5a2ff7ef9514fe234415
2015-02-23 15:49:43 +00:00
Narayan Kamath
1158c7d5fe Merge "Remove reference to NOT_USING_KLIBC and cygwin." 2015-02-20 16:40:33 +00:00
Narayan Kamath
5955a9f5e4 Remove reference to NOT_USING_KLIBC and cygwin.
The reference to NOT_USING_KLIBC appears to be the only one
in our codebase. This change also removes some cygwin specific
retry logic - all other supported platforms in this section
of the code should support mapping at an offset.

Note that i've reversed the sense of the check, we always sysconf
since that's recommended practice.

Change-Id: Ib985fb665193d7a07a282f7092cd77c0bc508a66
2015-02-19 18:36:27 +00:00
Elliott Hughes
9d1f515ed1 Fix the WriteStringToFile overload that takes mode/owner/group.
The actual bug is == instead of !=, but the real cause was me trying to be
too clever. This patch switches to much simpler code, and -- since the
intended use of this code is security anyway -- adds logging if anything
goes wrong.

Bug: 19361774
Change-Id: If2af07d31a5002f9010b838247b691f6b28bdfb1
2015-02-17 10:25:23 -08:00
Elliott Hughes
f682b4786a Clean up reading and writing in init.
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.

I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...

Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
2015-02-06 14:20:30 -08:00
Elliott Hughes
31fa09c1c6 Fix Windows build.
Only two days in, and I'm already really regretting putting this code
somewhere that builds for Mac OS and Windows...

Change-Id: I576ee4a9e647e10dc2d47c7e1e38aedee2bf404c
2015-02-04 19:38:28 -08:00
Elliott Hughes
202f024dee Add a WriteStringToFile overload that cares about permissions.
Change-Id: I857a80b61768d4e9610bdd149eff2d9d8e48d2c0
2015-02-04 14:30:23 -08:00
Elliott Hughes
6b3be2902d Add Google-style StringPrintf.
Change-Id: If333c28b8ed047346a2dd85e591c4bedbab874cc
2015-02-03 15:21:07 -08:00
Elliott Hughes
af4885a4a8 Fix Mac build.
I knew I should have created a new library that doesn't build for the
Mac or Windows rather than adding to libutils...

Change-Id: I7c07eaa93affb7e83d4da384f03652c39065562a
2015-02-03 13:02:57 -08:00
Elliott Hughes
dec12b2b71 Add Google-style ReadFileToString and WriteStringToFile.
Bug: 19217569
Change-Id: I64789d3fa6777ee30a324cdf00fdc275c1230e1b
2015-02-03 12:18:11 -08:00
Yabin Cui
4a6e5a3b64 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
2015-01-27 14:23:22 -08:00
Elliott Hughes
292ccd3c18 Fix references to HAVE_PRCTL.
Change-Id: I8343b398f2ce0d743487fdd086e67763c7dd67f1
2014-12-15 12:52:53 -08:00
Trevor Drake
dabdbf9a6e Clean up libutils Android.mk
Removed LOCAL_C_INCLUDES as the external/zlib headers are no longer
referenced by anything in libutils.

Removed unused host_commonLdlibs build variable. This was referenced
by the lib64utils host target which was removed in commit 03cc1f747

Tested compiling some of the projects that make use of libcutils
using a clean out dir with the folllowing targets

aosp_arm-eng : make -j16 logd dexdump
aosp-flouder-userdebug : make -j16 keystore vold libjavacore logd
aosp-x86_64-eng : make -j16 keystore vold libjavacore logd dexdump

Change-Id: I663e52bbf28dde27866dad9429bf95ada6b594a5
2014-12-06 09:27:19 +00:00
Elliott Hughes
22a40e6a7a Use __arm__ instead of ARCH_ARM.
Change-Id: I777da5757f01d8328d5475e654d56d81dc802655
2014-12-04 14:17:26 -08:00
Andreas Gampe
a53c815323 Libutils: Comment out unused constants
For build-system CFLAGS clean-up, "remove" unused variables.

Change-Id: Ic96f066981cd96ca16af81ee3fdbc972507e8c81
2014-11-24 09:43:10 -08:00
Elliott Hughes
97ac0e1bb4 Kill HAVE_BIG_ENDIAN, HAVE_ENDIAN_H, and HAVE_LITTLE_ENDIAN.
Change-Id: I9e25ac9d27e95b04fb8bf7a66c619af0139d8b8f
2014-11-21 23:10:45 -08:00
Yabin Cui
745c5f6ad0 kill HAVE_MADVISE
Change to avoid "unused parameter" warning. 

Bug: 18397020
Change-Id: I4b26de55314c78237daead8e873385b97cafe4d4
2014-11-19 04:03:27 +00:00
Yabin Cui
819b480b93 kill HAVE_MADVISE
Bug: 18397020
Change-Id: Ibc8d886d729c51932a403531888214de4e541452
2014-11-18 18:15:40 -08:00
Dan Albert
890442a02d Move libutils to libc++.
Bug: 15193147
Change-Id: I85aff3bcabb5ee3c8be9918b7bef0fd1bbfa98e3
2014-11-15 16:32:26 -08:00
Andreas Gampe
dd060f01f6 System/core: Use memmove
Should use memmove when you expect overlap.

Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee
2014-11-13 15:50:17 -08:00
Yabin Cui
266092c52d kill HAVE_POSIX_FILEMAP
Bug: 18315579
Change-Id: I0bd5fb946b12cb90e0c9c73a478df41609b8c3e2
2014-11-11 10:31:30 -08:00
Dan Albert
5fc8f683e6 am 7a92d20e: Merge "Clean up some test makefiles."
* commit '7a92d20ec845c07472eaea7cf14fd0e69df836ef':
  Clean up some test makefiles.
2014-11-05 02:27:42 +00:00
Dan Albert
27d166cb3a Clean up some test makefiles.
Needed for building with libc++ as the default STL.

Bug: 15193147
Change-Id: I8b462bd288fbea7e0ab182f85ffcbf438afb6aa4
2014-11-04 17:19:55 -08:00
Xavier Ducrohet
d82db1581b am 1c77bf4c: Merge "Fix windows specific behavior of FileMap" into lmp-dev
* commit '1c77bf4ce5059f3a770418cfa8afed39ee41ab24':
  Fix windows specific behavior of FileMap
2014-10-16 19:12:48 +00:00
Xavier Ducrohet
1a55aa5e34 Fix windows specific behavior of FileMap
The implementation of the FileMap destructor would
close the file, only on Windows, which did not match
the behavior on mac/linux.

This is because calling munmap does not close the file
descriptor. It must be closed separately, before or after
munmap.

On Windows, the file must also be closed manually,
before or after closing the mappingFile.

The change basically removes the closing file from
the windows-specific part of the destructor, to
make behavior more consistent on all platforms
where the caller to FileMap is responsible for closing
its own file (since FileMap receives an opened file).

Change-Id: I5e3cfffbb870d5f3595802ccac57dbc1dbf1ce6e
2014-10-16 12:09:06 -07:00
Christopher Ferris
b57122a0a6 am 3fe9adc9: Merge "Fix write past end of memory." into lmp-dev
* commit '3fe9adc932948da8993d3f812bce1875efc47c0e':
  Fix write past end of memory.
2014-10-07 23:23:17 +00:00
Christopher Ferris
de722e56df Fix write past end of memory.
The computed flattened size of the blob does not match the size used by the
flatten function when the last cached entry size is not 4 byte aligned.

Bug: 17873145
Change-Id: I9f9fc102d4bde4681ae977b6de5f263aaaf56708
2014-10-07 14:52:31 -07:00
Dan Albert
fb1b6daca8 am 522c1d34: am e18ed89e: Merge "Remove makefile cruft."
* commit '522c1d340b6c1742d3e47aad27b974e43fad4bc2':
  Remove makefile cruft.
2014-09-12 20:08:49 +00:00
Elliott Hughes
8ac097a036 am e4bf208c: am 082a52b5: Merge "Move libutils over to pthread_gettid_np."
* commit 'e4bf208ce8d893634a0f6f63ce34ec6498934d05':
  Move libutils over to pthread_gettid_np.
2014-09-12 20:08:48 +00:00
Dan Albert
e18ed89eae Merge "Remove makefile cruft." 2014-09-12 18:07:26 +00:00
Dan Albert
fbb8db2e2a Remove makefile cruft.
Don't manually include stlport, and don't use private bionic headers.

Change-Id: I0fc4e8b34ab449e9ef07c26f71e472fca5640590
2014-09-12 10:36:26 -07:00
Elliott Hughes
7bf5f209ce Move libutils over to pthread_gettid_np.
Bug: 17476168
Change-Id: I934d93a023eb00e036ed3cee8c52efaeb17b8915
2014-09-12 10:19:08 -07:00
Igor Murashkin
831789a9f2 am 6ba555f2: Merge "libutils: Don\'t segfault ProcessCallStack when getting thread name fails" into lmp-dev
* commit '6ba555f2ad878129cd1da9dd7b7613ab166090ab':
  libutils: Don't segfault ProcessCallStack when getting thread name fails
2014-08-19 23:44:28 +00:00
Igor Murashkin
63fbdb6440 libutils: Don't segfault ProcessCallStack when getting thread name fails
There's an inherent race in trying to read out the thread name from
the system and the thread closing out on its own (and thus being removed
from procfs).

Try to handle this by formatting the thread name unconditionally with
the tid when getting the thread name fails (instead of dereferencing
NULL and crashing).

Bug: 15406837
Change-Id: Ibf2208b8ce345589e7e9c57e6a307728d1121c5d
2014-08-19 11:48:52 -07:00
Elliott Hughes
10cce72c4b am 3859029a: am 7fb0ee0c: Merge "Remove androidGetTid."
* commit '3859029a48aa78150fa61eb4988214f8632b33ce':
  Remove androidGetTid.
2014-08-18 19:34:23 +00:00
Elliott Hughes
b7659613b2 Remove androidGetTid.
Bug: 17048545
Change-Id: I93cbb2d7bd18d506b5f5f7f262dd9ac0fca053b4
2014-08-18 10:47:37 -07:00
Dmitriy Ivanov
614b923241 am 52b59127: am e7ec28bb: Merge "Exclude bionic private headers from include path"
* commit '52b59127d847bef1fd16efe2df578b3079b37918':
  Exclude bionic private headers from include path
2014-07-31 17:44:36 +00:00
Dmitriy Ivanov
4ffed01fb7 Exclude bionic private headers from include path
(cherry picked from commit 9516139c03)

Change-Id: I2883e2a13a523e6938c8a3aed93e66af948cdcd8
2014-07-31 11:16:01 -07:00
Antoine Labour
71db714437 am 4bb951a8: Merge "BlobCache: fix uninitialized memory" into lmp-dev
* commit '4bb951a85a4888540caba4f14f18e99917d4c994':
  BlobCache: fix uninitialized memory
2014-07-30 16:40:33 +00:00
Dmitriy Ivanov
9516139c03 Exclude bionic private headers from include path
Change-Id: I8b1269a739a690af91c63fa0f7f8f01d2d43bb97
2014-07-31 10:21:00 -07:00
Antoine Labour
5f6ebc2f9c BlobCache: fix uninitialized memory
When flattening the BlobCache, we insert padding for alignment. Make
sure to zero the padding bytes to have reproducible results.

Bug: 16569863
Change-Id: Id39eac5e6a1687459eb6bc2074b1339393fce711
2014-07-28 15:50:33 -07:00
Tim Murray
f505dae2d5 am f2879ef6: am 6698ebf9: Merge "Fix Darwin build caused by -Wunused-parameter."
* commit 'f2879ef61453c845e2f675011e0cbc41d1396040':
  Fix Darwin build caused by -Wunused-parameter.
2014-07-25 02:24:28 +00:00
Tim Murray
b37009fa77 Fix Darwin build caused by -Wunused-parameter.
bug 16172793

Change-Id: I1d0514c00085cb5d18ebdd064e96885d6eaa1e59
2014-07-24 17:22:09 -07:00
Stephen Hines
eb49dd791e Remove invalid 64-bit host objects.
Bug: 16408818

These targets are no longer in use, since we have a proper way to create both
32-bit and 64-bit host libraries in a single build now.

Cherry-pick from AOSP: 03cc1f747c

Change-Id: Icd09f795acd220de5b5e956a8d8e1b4ab4864fa9
2014-07-25 10:39:38 -07:00
Stephen Hines
da6d2cb925 am 31dc191b: am 73290cd1: Merge "Remove invalid 64-bit host objects."
* commit '31dc191b2b39d4cbd68feba29c7692c91de57a53':
  Remove invalid 64-bit host objects.
2014-07-22 20:53:45 +00:00
Stephen Hines
03cc1f747c Remove invalid 64-bit host objects.
Bug: 16408818

These targets are no longer in use, since we have a proper way to create both
32-bit and 64-bit host libraries in a single build now.

Change-Id: Icd09f795acd220de5b5e956a8d8e1b4ab4864fa9
2014-07-22 13:36:16 -07:00
Cylen Yao
3b13803850 am 72299bf0: [Bug]NE when playing mp3 with incorrect UTF16 char
* commit '72299bf0d240072174f847d13f1c9498b3ef9fa6':
  [Bug]NE when playing mp3 with incorrect UTF16 char
2014-06-11 12:41:36 +00:00
Cylen Yao
72299bf0d2 [Bug]NE when playing mp3 with incorrect UTF16 char
Bug: 15274351
Bug: 15539240

Many MP3 files have incorrect utf16 chars, but the
Utf16_to_utf8_length() routine checks for errors in
standard utf16 char.  utf16_to_utf8() was not checking
for errors in standard utf16 char.

Change-Id: Iafd922ff92cabe6bba8971215fcfd1fd471c894b
(cherry picked from commit 605b139cdf56364c6c9b37e59dd12efc61c24631)
2014-06-10 19:14:59 +00:00
Jeff Brown
c24b98c7d8 Add a couple of useful string functions. (DO NOT MERGE)
Change-Id: I158f69917bab5f15482dd8f2b66b36a4cc0f11ad
(cherry picked from commit 5ee915afe1)
2014-06-09 21:30:16 +00:00
Jeff Brown
5ee915afe1 Add a couple of useful string functions.
Change-Id: I158f69917bab5f15482dd8f2b66b36a4cc0f11ad
2014-06-09 14:02:52 -07:00
Ian Rogers
1165cf4f44 am 928821bd: am 72d77449: am 4ca26ce8: Merge "Host multilib build of both 32-bit and 64-bit libraries."
* commit '928821bd123aa38094289b9c62debb4d92b84069':
  Host multilib build of both 32-bit and 64-bit libraries.
2014-06-05 23:00:09 +00:00
Ian Rogers
928821bd12 am 72d77449: am 4ca26ce8: Merge "Host multilib build of both 32-bit and 64-bit libraries."
* commit '72d77449d99833140f7dd838db6556484031da29':
  Host multilib build of both 32-bit and 64-bit libraries.
2014-06-05 22:56:00 +00:00
Ian Rogers
59ec765382 Host multilib build of both 32-bit and 64-bit libraries.
Change-Id: I54f91f385b109fc664a1a1f9320affb2a846fef1
2014-06-05 15:26:22 -07:00
Mark Salyzyn
c9573e147e am b2a9129e: am bf0ed824: am 60ca7a22: Merge "libutils: turn on -Werror"
* commit 'b2a9129e8f0666884dee660515c51d4dd5c17c7a':
  libutils: turn on -Werror
2014-06-04 18:29:49 +00:00
Mark Salyzyn
b2a9129e8f am bf0ed824: am 60ca7a22: Merge "libutils: turn on -Werror"
* commit 'bf0ed82485e0166dd5f5c9415026c2dc3fd2ae4b':
  libutils: turn on -Werror
2014-06-04 18:26:41 +00:00
Mark Salyzyn
5bed803664 libutils: turn on -Werror
- Deal with some -Wunused issues
- Override PRI macros (windows)
- Revert use of PRI macros on off64_t (linux)
- Deal with a gnu++11 complaince issue

Change-Id: Ie66751293bd84477a5a6dfd8a57e700a16e36964
2014-06-02 15:57:50 -07:00
Dan Albert
70b53c4057 am 4b126c46: am e8f90ca6: am 570cd46d: Merge "Revert "Move libutils to libc++""
* commit '4b126c4604965ea029d9c741d074ad7f820b5269':
  Revert "Move libutils to libc++"
2014-05-30 20:24:07 +00:00
Dan Albert
4b126c4604 am e8f90ca6: am 570cd46d: Merge "Revert "Move libutils to libc++""
* commit 'e8f90ca60d65f5a0542b77f8f517c4fb80da2e52':
  Revert "Move libutils to libc++"
2014-05-30 20:21:03 +00:00
Dan Albert
570cd46d14 Merge "Revert "Move libutils to libc++"" 2014-05-30 20:13:48 +00:00
Dan Albert
7bc49a16e8 Revert "Move libutils to libc++"
Causes issues in the unbundled branches.

This reverts commit dc133729b0.

Change-Id: I9185ce9ea9e0ea631f0bfe016edf38c6830b288a
2014-05-30 19:40:58 +00:00
Dan Albert
6f8030c565 am 58f4a09b: am 36f536fc: am 9f69e028: Merge "Move libutils to libc++"
* commit '58f4a09bb4375c2f7b85ec14449a0588e85e126a':
  Move libutils to libc++
2014-05-30 19:01:45 +00:00
Dan Albert
58f4a09bb4 am 36f536fc: am 9f69e028: Merge "Move libutils to libc++"
* commit '36f536fc7b88fe21a974bce6fed565bc622b5bc2':
  Move libutils to libc++
2014-05-30 18:43:01 +00:00
Dan Albert
9f69e028f7 Merge "Move libutils to libc++" 2014-05-30 18:32:08 +00:00
Mark Salyzyn
3051ddd13a am 4547273b: am 265262a8: am 5f815da3: Merge "String16.cpp rm unused utils/Debug.h"
* commit '4547273b427422d69260a21dd19b1480aff7b890':
  String16.cpp rm unused utils/Debug.h
2014-05-29 23:56:57 +00:00
Mark Salyzyn
4547273b42 am 265262a8: am 5f815da3: Merge "String16.cpp rm unused utils/Debug.h"
* commit '265262a8b243faa16c268ac40801a226359437a6':
  String16.cpp rm unused utils/Debug.h
2014-05-29 23:54:30 +00:00
Mark Salyzyn
6443033f6d String16.cpp rm unused utils/Debug.h
Change-Id: Ie7e3695770f20be33738a0f0a868cc914248d91a
2014-05-29 13:14:35 -07:00
Dan Albert
dc133729b0 Move libutils to libc++
Bug: 15193147
Change-Id: Ib4b1835e77279db905e098abc7c9bf8d27d66b57
2014-05-29 10:19:39 -07:00
Calin Juravle
7000e66643 am 29415ce2: am 72f51179: am cd3897d0: Merge "Move libutils from fdprintf to POSIX dprintf."
* commit '29415ce2fbb3a96e513abd00589da169d3399aee':
  Move libutils from fdprintf to POSIX dprintf.
2014-05-22 16:49:10 +00:00
Calin Juravle
29415ce2fb am 72f51179: am cd3897d0: Merge "Move libutils from fdprintf to POSIX dprintf."
* commit '72f51179849c338747fd83d638c90b6be42a43cf':
  Move libutils from fdprintf to POSIX dprintf.
2014-05-22 13:44:19 +00:00
Elliott Hughes
dcc98da018 Move libutils from fdprintf to POSIX dprintf.
Bug: 11156955
Change-Id: I70a75c07744d9897d76b180e4940b8717297c53f
2014-05-22 01:23:29 -07:00
Ying Wang
da6a0aa0df am b18da571: am 1e6cd741: am 803fb62b: Merge "Remove unused LOCAL_LDLIBS."
* commit 'b18da571f90eebedd99fe5607a6b0d7ae4e91893':
  Remove unused LOCAL_LDLIBS.
2014-05-08 18:23:57 +00:00
Ying Wang
b18da571f9 am 1e6cd741: am 803fb62b: Merge "Remove unused LOCAL_LDLIBS."
* commit '1e6cd741fd130e5916337eb75c9ceef2152035d2':
  Remove unused LOCAL_LDLIBS.
2014-05-07 23:01:12 +00:00
Ying Wang
9f437d7181 Remove unused LOCAL_LDLIBS.
Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
2014-05-07 15:36:05 -07:00
Mark Salyzyn
b16d1be557 am 2898a4ad: am 7fb0ff53: am 25f07f77: Merge changes I487ebe67,Ie7a0aeb2
* commit '2898a4ad5ede1fa3d42b4b2bd54a4b91b61bcc2b':
  libutils: FileMap styling adjustments
  libutils: FileMap 64 bit compile issues
2014-04-17 23:33:49 +00:00
Mark Salyzyn
2898a4ad5e am 7fb0ff53: am 25f07f77: Merge changes I487ebe67,Ie7a0aeb2
* commit '7fb0ff53e87115d98af7272368348bbc270516ae':
  libutils: FileMap styling adjustments
  libutils: FileMap 64 bit compile issues
2014-04-17 23:22:28 +00:00
Mark Salyzyn
cf100c9b85 am 270abd69: am ca242b49: am 280b7d40: Merge "libutils: BlobCache 64 bit compile issues"
* commit '270abd69448a1cae78649127aa43750b4067192f':
  libutils: BlobCache 64 bit compile issues
2014-04-17 19:36:37 +00:00
Mark Salyzyn
270abd6944 am ca242b49: am 280b7d40: Merge "libutils: BlobCache 64 bit compile issues"
* commit 'ca242b497daa152f517f2b74037d5e2765f3ad2d':
  libutils: BlobCache 64 bit compile issues
2014-04-17 17:07:44 +00:00
Mark Salyzyn
b618576ff1 libutils: FileMap styling adjustments
Change-Id: I487ebe67a46a7b8f680e722141dd216bbd396f3e
2014-04-17 10:02:15 -07:00
Mark Salyzyn
15085a6a2c libutils: FileMap 64 bit compile issues
Change-Id: Ie7a0aeb2a7e2d2a90aa2b97c657ea7ec566bf793
2014-04-17 09:43:36 -07:00
Mark Salyzyn
387c561300 libutils: BlobCache 64 bit compile issues
Change-Id: I60e9bddfff04f19834b83bdc26a83ca7173363c3
2014-04-17 08:32:11 -07:00
Narayan Kamath
c9cc643f8b am 48030e68: am e7ddcad8: am 0f4575db: Merge "HAVE_POSIX_CLOCKS doesn\'t imply CLOCK_BOOTTIME."
* commit '48030e68e5d2d763ab9c1ca88036837e1e4f3c08':
  HAVE_POSIX_CLOCKS doesn't imply CLOCK_BOOTTIME.
2014-04-15 20:52:51 +00:00
Narayan Kamath
48030e68e5 am e7ddcad8: am 0f4575db: Merge "HAVE_POSIX_CLOCKS doesn\'t imply CLOCK_BOOTTIME."
* commit 'e7ddcad89f2950d58b4022b55f2cf693daac2e19':
  HAVE_POSIX_CLOCKS doesn't imply CLOCK_BOOTTIME.
2014-04-15 11:02:59 +00:00
Narayan Kamath
0f4575dbbd Merge "HAVE_POSIX_CLOCKS doesn't imply CLOCK_BOOTTIME." 2014-04-15 10:56:26 +00:00
Sasha Levitskiy
e2acb82a94 am 43cb7ae6: am 4f362e43: am 835526fd: Merge "Cleanup: warning fixit."
* commit '43cb7ae6c31ced8cd518eab59dfea31ab1ade812':
  Cleanup: warning fixit.
2014-04-12 00:02:33 +00:00
Sasha Levitskiy
43cb7ae6c3 am 4f362e43: am 835526fd: Merge "Cleanup: warning fixit."
* commit '4f362e438c6ee5688c4f2f444203ed7acffa566b':
  Cleanup: warning fixit.
2014-04-12 00:00:02 +00:00
Sasha Levitskiy
cdc1cfb3e5 Cleanup: warning fixit.
bootable/recovery has a dependent commit: I9adb470b04e4301989d128c9c3097b21b4dea431

Change-Id: Icf23e659265d71d5226d527c2b40cfbc132320ee
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2014-04-11 16:15:46 -07:00
Narayan Kamath
ea659643ee HAVE_POSIX_CLOCKS doesn't imply CLOCK_BOOTTIME.
HAVE_POSIX_CLOCKS imples clock_gettime,settime and
CLOCK_REALTIME / CLOCK_MONOTONIC.

CLOCK_BOOTTIME appears only on newer versions of glibc
and might only be supported on newer kernels.

Change-Id: I66e724a3593538c3b80de2c5f81a964d3fa96eaf
2014-04-10 20:19:20 +01:00
Wonsik Kim
94404eef65 Merge "Clarify ownership for NativeHandle::mHandle" 2014-04-02 06:13:59 +00:00