summaryrefslogtreecommitdiffstats
path: root/include/utils
Commit message (Collapse)AuthorAgeFilesLines
* Remove useless refCounting from FileMap.Narayan Kamath2015-02-231-16/+2
| | | | | | | | | 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
* Clean up reading and writing in init.Elliott Hughes2015-02-061-0/+3
| | | | | | | | | | | | | 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
* Fix Windows build.Elliott Hughes2015-02-051-0/+3
| | | | | | | Take 2. Probably should have done this in the beginning, but thought I was being clever. Change-Id: I85c6e487eece9bcc75f8f62c850c2d4d1ee9e908
* Add a WriteStringToFile overload that cares about permissions.Elliott Hughes2015-02-041-0/+3
| | | | Change-Id: I857a80b61768d4e9610bdd149eff2d9d8e48d2c0
* Merge "Add Google-style StringPrintf."Elliott Hughes2015-02-031-0/+38
|\
| * Add Google-style StringPrintf.Elliott Hughes2015-02-031-0/+38
| | | | | | | | Change-Id: If333c28b8ed047346a2dd85e591c4bedbab874cc
* | Extra Win32 compatibility.Elliott Hughes2015-02-031-0/+6
|/ | | | Change-Id: Ibc583aba580f4fc15c243f495ead44b2ce4c6e5e
* Add Google-style ReadFileToString and WriteStringToFile.Elliott Hughes2015-02-031-0/+29
| | | | | Bug: 19217569 Change-Id: I64789d3fa6777ee30a324cdf00fdc275c1230e1b
* Kill HAVE_PTHREADS.Yabin Cui2015-01-275-13/+13
| | | | | Bug: 19083585 Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
* Add required casts for clang/llvm -Wc++11-narrowingChih-Hung Hsieh2015-01-121-2/+2
| | | | | | | | | | | | system/core/include/utils/Mutex.h:134:25: error: non-constant-expression cannot be narrowed from type 'long long' to '__kernel_time_t' (aka 'long') in initializer list [-Wc++11-narrowing] system/core/include/utils/Mutex.h:135:26: error: non-constant-expression cannot be narrowed from type 'long long' to 'long' in initializer list [-Wc++11-narrowing] Change-Id: Icb9df26aeb01617da5ab1c36987289f7c2b11954
* Linux always has POSIX clocks available.Elliott Hughes2015-01-091-3/+3
| | | | | | | pixelflinger doesn't have to run on the Mac, but the Condition code might. Change-Id: Ib4e9b4daa6e848ffd5742959427b172d45f08e3c
* Mutex: add timedLock() methodJesse Hall2015-01-071-4/+24
| | | | | | | | This is not available for host builds because OSX doesn't have pthread_mutex_timedlock() or equivalent. Bug: 18842510 Change-Id: I072e74ab1a6f770fd245828b39c5f954dda1113b
* Merge "Remove incompatible Unicode compatibility types."Dan Albert2014-12-121-6/+0
|\
| * Remove incompatible Unicode compatibility types.Dan Albert2014-11-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | As well intentioned as these were, uint16_t and C++11's char16_t are _not_ actually compatible. They are not implicitly convertible, and they mangle differently, so they are not even ABI compatible. In our now wonderous world of C++11, no one should be using these, so just kill them. Bug: 18300613 Change-Id: I06d92d7f1d937dd94a620874323d4c50eb6a31bd
* | Use full qualified name in macros.Chih-Hung Hsieh2014-12-111-3/+4
| | | | | | | | | | | | | | | | | | The ANDROID_SINGLETON_STATIC_INSTANCE is used in some files out of the android namespace. If it does not use full qualified names, users of this macro will need to use it inside the 'android' namespace to avoid warnings from clang compiler. Change-Id: Ie4d4ba2b57fdc72d0deb3b7c2326304a44a1300f
* | Fix Mac build.Elliott Hughes2014-11-221-1/+1
| | | | | | | | Change-Id: Iae697ae257cf4b1d675e2b758dd31d5a6a71ae4d
* | Kill HAVE_BIG_ENDIAN, HAVE_ENDIAN_H, and HAVE_LITTLE_ENDIAN.Elliott Hughes2014-11-211-10/+5
| | | | | | | | Change-Id: I9e25ac9d27e95b04fb8bf7a66c619af0139d8b8f
* | Add a pre-C++11 constexpr compatibility macro.Dan Albert2014-11-201-0/+11
|/ | | | | | | | | Needed for cases where something should be constexpr if possible, but not being constexpr is fine if in pre-C++11 code (such as a const static float member variable). Bug: 18466763 Change-Id: I635d062575ba2fbc4cbe3a89f730128c404d95e1
* kill HAVE_POSIX_FILEMAPYabin Cui2014-11-111-2/+2
| | | | | Bug: 18315579 Change-Id: I0bd5fb946b12cb90e0c9c73a478df41609b8c3e2
* Merge "Move winsock2.h in front of a potential windows.h include."Stephen Hines2014-11-091-0/+4
|\
| * Move winsock2.h in front of a potential windows.h include.Stephen Hines2014-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | Files that included FileMap.h (possibly transitively), before including ByteOrder.h (which pulls in winsock2.h directly), will experience a compiler warning/error from the latest mingw headers. This happens because the headers require that winsock2.h come before windows.h in all cases. The simplest (and most error-proof) fix for now is to include winsock2.h before this use of windows.h. Change-Id: I33069e4c9962d9820d0ea5976554f89d7ff6307c
* | Make Unicode.h use types that match libc++.Dan Albert2014-11-081-2/+2
|/ | | | | | | libc++ also defines these types for pre-C++11, and the two definitions need to match to avoid redefinition errors. Bug: 18300613 Change-Id: I1e9198d39f7c470f37bc6edba2dca2d499f54c9b
* am fbb4188c: am d559d6c7: Merge "defined(HAVE_OFF_T) is really just ↵Elliott Hughes2014-09-231-8/+4
|\ | | | | | | | | | | | | !defined(__APPLE__)." * commit 'fbb4188cfac18b457801cf3e304bfa39dd29dde8': defined(HAVE_OFF_T) is really just !defined(__APPLE__).
| * defined(HAVE_OFF_T) is really just !defined(__APPLE__).Elliott Hughes2014-09-221-8/+4
| | | | | | | | Change-Id: I83c271bfe24b777acf293d2b4ac5af2cce8398b9
* | am 3859029a: am 7fb0ee0c: Merge "Remove androidGetTid."Elliott Hughes2014-08-182-5/+2
|\ \ | |/ | | | | | | * commit '3859029a48aa78150fa61eb4988214f8632b33ce': Remove androidGetTid.
| * Remove androidGetTid.Elliott Hughes2014-08-182-5/+2
| | | | | | | | | | Bug: 17048545 Change-Id: I93cbb2d7bd18d506b5f5f7f262dd9ac0fca053b4
* | am 4c818dc8: am 56b28f6b: Merge "RefBase: make Renamer destructor virtual"Elliott Hughes2014-08-061-2/+4
|\ \ | |/ | | | | | | * commit '4c818dc800d97e2fdee0337a0e9736099d90cc47': RefBase: make Renamer destructor virtual
| * RefBase: make Renamer destructor virtualUkri Niemimuukko2014-08-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the Renamer class destructor virtual and fixes the incorrect constructor initialization list ordering. These issues and related compiler warnings have been suppressed by the build system which uses the gcc –isystem command line option, unless a project explicitly adds the include the path system/core/include to Android.mk and uses the templates. Change-Id: Iff76a655eb8bd547adfe994c7315a005e98aed41 Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com> Signed-off-by: Mingwei Shi <mingwei.shi@intel.com> Signed-off-by: Yong Yao <yong.yao@intel.com>
* | Add a couple of useful string functions.Jeff Brown2014-06-091-0/+13
| | | | | | | | Change-Id: I158f69917bab5f15482dd8f2b66b36a4cc0f11ad
* | am 7aa8cdfb: am 21157abc: am 8814bd1d: Merge "include: cleanup for ↵Mark Salyzyn2014-05-232-5/+9
|\ \ | | | | | | | | | | | | | | | | | | -Wsystem-header" * commit '7aa8cdfb317dcb7efb7127b070526df09da05377': include: cleanup for -Wsystem-header
| * \ am 21157abc: am 8814bd1d: Merge "include: cleanup for -Wsystem-header"Mark Salyzyn2014-05-232-5/+9
| |\ \ | | |/ | | | | | | | | | * commit '21157abcd932e899032689dba120d4f7cb08aa23': include: cleanup for -Wsystem-header
| | * include: cleanup for -Wsystem-headerMark Salyzyn2014-05-232-5/+9
| | | | | | | | | | | | | | | | | | | | | - warnings as errors, or errors introduced when -Wsystem-header was experimentally introduced. Change-Id: Ia8f5b3c1c1096e191741223d52526aa48c7f1cc4
* | | Add VirtualLightRefBaseJohn Reck2014-05-091-0/+7
| | | | | | | | | | | | Change-Id: I040db87d9e87ba0584e7e5bdd72f0c319a522fa1
* | | 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>