summaryrefslogtreecommitdiffstats
path: root/include/utils
Commit message (Collapse)AuthorAgeFilesLines
* Merge "libutils: Clarify Condition::signal wakes up exactly one thread"Igor Murashkin2014-04-151-1/+12
|\
| * libutils: Clarify Condition::signal wakes up exactly one threadIgor Murashkin2014-04-151-1/+12
| | | | | | | | | | | | | | Contrary to POSIX pthread_cond_signal guarantees, bionic will wake up either zero or one threads. Change-Id: I628fcd4d5bd8d5290104506f86caa82c54142230
* | Merge "Add a peekOldestValue"John Reck2014-04-141-0/+9
|\ \
| * | Add a peekOldestValueJohn Reck2014-04-111-0/+9
| |/ | | | | | | Change-Id: I89d8ea14c8ac02653d9c0e1fe24a4b17bb9c87f5
* | BitSet32 64b compatibility fixAndreas Gampe2014-04-111-3/+22
|/ | | | | | | | Using __builtin_c{l,t}zl fails on 64b systems as unsigned long is 8B there. However, unsigned int is only guaranteed to be 2B. Introduce a check that should be optimized away by the compiler. Change-Id: I854d0817c6bb5ae13c257241240664bf8f1a7c8a
* am 1f87d3ab: am 83fd6375: am 31631861: Merge "Add guards to prevent typedefs ↵Tim Murray2014-04-071-0/+3
|\ | | | | | | | | | | | | when C++11 is available." * commit '1f87d3ab8c384d03d1496c63f7faad15bd5eeba9': Add guards to prevent typedefs when C++11 is available.
| * am 83fd6375: am 31631861: Merge "Add guards to prevent typedefs when C++11 ↵Tim Murray2014-04-071-0/+3
| |\ | | | | | | | | | | | | | | | | | | is available." * commit '83fd6375f6d9016afe9bb03453d39b8c41cda548': Add guards to prevent typedefs when C++11 is available.
| | * Add guards to prevent typedefs when C++11 is available.Tim Murray2014-04-071-0/+3
| | | | | | | | | | | | | | | | | | char32_t and char16_t are both defined in C++11. Change-Id: I44fe8f4f05f230c18a1b77fa21b6a40c8f8ecc2d
| * | am df33e8b5: Add BitSet64. DO NOT MERGEMichael Wright2014-03-261-22/+173
| |\ \ | | |/ | |/| | | | | | | * commit 'df33e8b544c457e4b08e8fa0b8a3eaf5eaf8fc2e': Add BitSet64. DO NOT MERGE
| | * Add BitSet64. DO NOT MERGEMichael Wright2014-03-241-22/+173
| | | | | | | | | | | | Change-Id: Idf3e21dfaa9f90f4dcb1b4d41eed3891dda99561
* | | Clarify ownership for NativeHandle::mHandleWonsik Kim2014-03-241-3/+6
| | | | | | | | | | | | Change-Id: I0835278df1aa78f10d5493d7ef2c9e4a15c0fee9
* | | Add static methods to BitSet.Michael Wright2014-03-191-41/+99
| | | | | | | | | | | | | | | | | | Also, moar testing. Change-Id: I512b337a1a85a0794445fc6249af7ca39ba7c381
* | | Add traits to BitSet64, not 32.Michael Wright2014-03-181-1/+1
| | | | | | | | | | | | Change-Id: I3d41bbe47f5b02c610f69fc7824e416436d086b1
* | | Add BitSet64Michael Wright2014-03-181-5/+98
| | | | | | | | | | | | Change-Id: Ia0039aae00316f42a8306a9fb8ad37269180b58c
* | | Add NativeHandle, a refcounted C++ wrapper around a native_handle_t*Jesse Hall2014-03-051-0/+53
| | | | | | | | | | | | Change-Id: I232dfa2ad2e4a463a39e2e901e4097dffe278cc3
* | | am bfed1360: am 1ed1d341: am 26fa5cd3: Merge "AArch64: Use negative values ↵Narayan Kamath2014-02-271-10/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | in error enumeration" * commit 'bfed136068feb299b3ca8a07d6eaf5d93e3ff2a3': AArch64: Use negative values in error enumeration
| * | AArch64: Use negative values in error enumerationAshok Bhat2014-02-201-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With AArch64 the enumerations with values in the range 0x80000000 to 0x80000007 are being assigned to ssize_t typed variables which are 64-bit rather than 32-bit, and are being used in conditions where they are being checked for being negative. This is not the case when ssize_t is 64-bit, so redefine this to INT32_MIN value. Change-Id: I7a031a940a28658b3bf34bebac93dfb3ba397b05 Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
| * | Revert "Move to the canonical UniquePtr.h."Elliott Hughes2014-02-042-1/+240
| | | | | | | | | | | | | | | | | | This reverts commit 2a72c575d260cd256f767b7ad511a6959444134b. Change-Id: Idb485f1be2906e8c1c8f0da3df186a7aade027f6
| * | Move to the canonical UniquePtr.h.Elliott Hughes2014-02-042-240/+1
| |/ | | | | | | Change-Id: I5330c36d2b571acb6d3debd30b8020e33aa8a4a7
* | resolved conflicts for merge of 47fa9064 to masterChristopher Ferris2014-01-171-1/+1
|\ \ | |/ | | | | Change-Id: I53fb8ff2dfbefe6246385e624c5c3525cc6f4253
| * Rewrite libbacktrace to be all C++.Christopher Ferris2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This includes removing the map_info.c source and replacing it with the BacktraceMap class to handle all map related code. Change all callers of libbacktrace map functionality. Also modify the corkscrew thread code so that it doesn't need to build the map twice (once in the corkscrew format and once in the libbacktrace format). Change-Id: I32865a39f83a3dd6f958fc03c2759ba47d12382e
| * Move BACKTRACE_NO_TID to BACKTRACE_CURRENT_THREAD.Christopher Ferris2014-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use a bit better name for this. The other name was a bit confusing. Change-Id: I1261f2ee3854a9c8b82133ad0bfbbbe48b43c9ac (cherry picked from commit 242b1a8c7a5ec73172bac811e51acbc27201f22c) Conflicts: libbacktrace/Backtrace.cpp
| * Move CallStack to libbacktrace.Christopher Ferris2014-01-092-32/+9
| | | | | | | | | | | | | | | | | | Fix a small bug in the Printer for strings that didn't properly prepend the prefix. (cherry picked from commit 9b0e074c6d38143e01616404a08b0c7aa992f3c3) Change-Id: I78bfa3f76864c34f33fb439bf20dfc85616f1077
* | am 137ab19a: am b37b53bf: am 87942c9a: am b3bfe881: Merge "Make libutils ↵Brian Carlstrom2013-12-191-23/+112
|\ \ | |/ | | | | | | | | | | Looper independent of frameworks/native" * commit '137ab19a0a196a419636b078f94aef23b1172335': Make libutils Looper independent of frameworks/native
| * Make libutils Looper independent of frameworks/nativeBrian Carlstrom2013-12-181-23/+112
| | | | | | | | Change-Id: I1dacca10a3cd7601abc3451b69ed761bf71c38fe
* | Move BACKTRACE_NO_TID to BACKTRACE_CURRENT_THREAD.Christopher Ferris2013-11-121-1/+1
| | | | | | | | | | | | Use a bit better name for this. The other name was a bit confusing. Change-Id: I1261f2ee3854a9c8b82133ad0bfbbbe48b43c9ac
* | Move CallStack to libbacktrace.Christopher Ferris2013-11-062-32/+9
| | | | | | | | | | | | | | Fix a small bug in the Printer for strings that didn't properly prepend the prefix. Change-Id: I33c63841ef6e07728ab3195886539d82b38ee19a
* | am 39f18c9e: am 1b84e0a3: Merge "utils: Add ProcessCallStack to collect ↵Igor Murashkin2013-10-303-18/+235
|\ \ | |/ | | | | | | | | | | stack traces for all threads in a process" into klp-dev * commit '39f18c9ece973a0eaff7e982a120de63f31ee5c0': utils: Add ProcessCallStack to collect stack traces for all threads in a process
| * utils: Add ProcessCallStack to collect stack traces for all threads in a processIgor Murashkin2013-10-253-18/+235
| | | | | | | | | | | | | | - Also add a Printer class (print lines to logcat, fd, or strings) Bug: 11324229 Change-Id: I78435ed49aa196a0efb45bf9b2d58b62c41737d3
* | Remove UniquePtr.h copyKenny Root2013-09-201-239/+0
| | | | | | | | | | | | | | | | | | | | This was copied from libcore/include quite a while ago, but the canonical version has since moved out to a generic library called libnativehelper. All users of this header should already have libnativehelper on their include path, so switching to the canonical version is as easy as removing the "utils/" part. Change-Id: Iae8e59bf3eee573bfa78381866989934e5bbf19d
* | Use canonical UniquePtr.h fileKenny Root2013-09-111-1/+1
|/ | | | Change-Id: I88b51b76120a83d2165d44421f29bcb5fd6d62a2
* minor tweaks to FlattenableUtilsMathias Agopian2013-08-011-5/+8
| | | | Change-Id: Ibfceec36434baac92c8815a18d902375d3fa1a6d
* Add a new utf8-to-utf16 conversion function.Dianne Hackborn2013-07-311-0/+7
| | | | Change-Id: I957c22fb219596ca4239db7a169473d3894b09eb
* Make Flattenable not virtual (libutils)Mathias Agopian2013-07-312-39/+92
| | | | | | | | | | | | Making an object Flattenable doesn't force it to become virtual anymore. For instance, Fence and GraphicBuffer are now non-virtual classes. Also change Flatennable protocol a bit so that it updates its parameters (pointers, sizes) to make it easier to implement a flattenable in terms of other flattenables. Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891
* libutils: give BasicHashtableImpl a virtual destructorAlex Ray2013-07-301-0/+1
| | | | Change-Id: I4ec590b060d732af5fe525670becbe778684247b
* utils: move thread enums to system/coreAlex Ray2013-07-301-47/+1
| | | | Change-Id: Ia97963cc9acf8661d01355786f5e7e7bf54581c2
* Added bitwise-or and bitwise-and to BitSetMichael Wright2013-07-301-0/+14
| | | | Change-Id: I9bbf41f9d2d4a2593b0e6d7d8be7e283f985bade
* Make trace macros slightly more robustTim Murray2013-07-301-0/+9
| | | | Change-Id: I9544eb7b27fc1a971cabadd8d5b4b4b80678febf
* remove unused declarations and reformatMathias Agopian2013-07-301-47/+44
| | | | Change-Id: I4e168fb62c275e02621c4b6e0c6000d0f006c327
* remove reserved virtual slotsMathias Agopian2013-07-301-20/+0
| | | | | | | these consume small amount of space (plt) in every library that links against libutils. Change-Id: I1b6b3dd9098aa5a051243f7a5dbf91cd7dcb8b2c
* new String8, String16 ctors to initialize empty static strings with static ↵Mathias Agopian2013-07-302-0/+18
| | | | | | | | | | | | | | | | linkage when libutils is statically linked, the ordering of the static initializer is not guaranteed and therefore it's unsafe to use empty static strings: e.g.: static String8 sThisStaticStringIsNotSafe; instead, this new constructor can be used: static String8 sThisStaticStringIsSafe(kEmptyString); Change-Id: Ia3daf1cab1c97d021c0ee9c2b394b5e27e8d6c0d
* libutils clean-upMathias Agopian2013-07-3016-1194/+12
| | | | Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
* Add new Looper API to check whether the looper is idle.Dianne Hackborn2013-07-301-0/+11
| | | | | | | | This is just to support the watchdog to give it a faster way to determine if a thread is deadlocked without having to post a message to it. Change-Id: I068dc8b9387caf94fe5811fb4aeb0f9b57b1a080
* improved CallStack a bitMathias Agopian2013-07-301-2/+4
| | | | | | | - added a ctor that updates and dumps the stack immediately - added a "logtag" parameter to dump() Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
* Fix a crasher with RefBase debugging and vectors of wp<>Mathias Agopian2013-07-301-39/+56
| | | | | | | | | | | | | | | | | | | | | | | background: we have some code to fix-up the IDs of references when using RefBase's DEBUG_REFS when those refs are managed by arrays wp<> or sp<> (this is because wp<> / sp<> don't have a trivial ctor when DEBUG_REFS is enabled, and Vector treats them as trivial for obvious performance reasons) this is complicated by the fact that we don't want to have to recompile everything when enabling DEBUG_REFs (i.e.: the Vector code cannot know wheter it's enabled or not for its template stuff). problem: there was a bug in the fix-up code for wp<> which was trying to access the weakref_impl from the RefBase* however, this was moronic since RefBase could have been destroyed if there wasn't any more strong refs -- and this happned. Instead we need to get the weakref_impl directly from the wp<> Change-Id: Ie16e334204205fdbff142acb9faff8479a78450b
* Add Vector::resize()Jesse Hall2013-07-302-1/+8
| | | | | Bug: 8384764 Change-Id: Icee83d389f3e555eba7d419b64c8d52a9aa21b8b
* Add Thread::isRunning and Condition::signal(WakeUpType)Romain Guy2013-07-302-0/+16
| | | | | | | The signal() method is useful to choose whether to wake up one or all threads. Change-Id: I062ab6d3ddd306a9fb735549ea140e2a76eed75a
* rename binder services main thread to Binder_*Mathias Agopian2013-07-301-0/+3
| | | | | | | | | | | When a binder service's main thread joins the thread pool it retains its name (whatever the exec name was), which is very confusing in systrace. we now rename that thread just like its friends in the thread pool. Change-Id: Ibb3b6ff07304b247cfc6fb1694e72350c579513e
* utils: Allow non android namespaces to use ALOGD_IF_SLOWNaseer Ahmed2013-07-301-1/+1
| | | | Change-Id: I9207b64954fae2f56cc5f6aa5796a2e737400623
* Add LinearAllocatorChris Craik2013-07-301-0/+97
| | | | | | Moving from external/webkit/Source/WebCore/platform/graphics/android/utils/ Change-Id: If91830aa9b207dbc8692b2ca7c4a0b76778addd5