Commit graph

319 commits

Author SHA1 Message Date
Dan Albert
da4f30c5b4 Merge "Remove incompatible Unicode compatibility types." 2014-12-12 02:42:30 +00:00
Chih-Hung Hsieh
c777f213b3 Use full qualified name in macros.
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
2014-12-11 11:19:57 -08:00
Elliott Hughes
8c275ffcba Fix Mac build.
Change-Id: Iae697ae257cf4b1d675e2b758dd31d5a6a71ae4d
2014-11-22 07:25:02 -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
Dan Albert
c59932f937 Remove incompatible Unicode compatibility types.
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
2014-11-20 11:54:39 -08:00
Dan Albert
e4c649c9fc Add a pre-C++11 constexpr compatibility macro.
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
2014-11-20 10:47:55 -08:00
Yabin Cui
266092c52d kill HAVE_POSIX_FILEMAP
Bug: 18315579
Change-Id: I0bd5fb946b12cb90e0c9c73a478df41609b8c3e2
2014-11-11 10:31:30 -08:00
Stephen Hines
f02c797256 Merge "Move winsock2.h in front of a potential windows.h include." 2014-11-09 07:24:43 +00:00
Stephen Hines
7e34121e39 Move winsock2.h in front of a potential windows.h include.
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
2014-11-08 19:30:05 -08:00
Dan Albert
2f5ad5ff86 Make Unicode.h use types that match libc++.
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
2014-11-08 20:22:30 +00:00
Elliott Hughes
830b77bc5c am fbb4188c: am d559d6c7: Merge "defined(HAVE_OFF_T) is really just !defined(__APPLE__)."
* commit 'fbb4188cfac18b457801cf3e304bfa39dd29dde8':
  defined(HAVE_OFF_T) is really just !defined(__APPLE__).
2014-09-23 16:05:18 +00:00
Elliott Hughes
cb3d65323d defined(HAVE_OFF_T) is really just !defined(__APPLE__).
Change-Id: I83c271bfe24b777acf293d2b4ac5af2cce8398b9
2014-09-22 20:50:54 -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
Elliott Hughes
aab3b34cd7 am 4c818dc8: am 56b28f6b: Merge "RefBase: make Renamer destructor virtual"
* commit '4c818dc800d97e2fdee0337a0e9736099d90cc47':
  RefBase: make Renamer destructor virtual
2014-08-06 22:48:30 +00:00
Ukri Niemimuukko
00e56a248d RefBase: make Renamer destructor virtual
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>
2014-08-06 00:12:06 -07:00
Jeff Brown
5ee915afe1 Add a couple of useful string functions.
Change-Id: I158f69917bab5f15482dd8f2b66b36a4cc0f11ad
2014-06-09 14:02:52 -07:00
Mark Salyzyn
881c89c54a am 7aa8cdfb: am 21157abc: am 8814bd1d: Merge "include: cleanup for -Wsystem-header"
* commit '7aa8cdfb317dcb7efb7127b070526df09da05377':
  include: cleanup for -Wsystem-header
2014-05-23 22:33:41 +00:00
Mark Salyzyn
7aa8cdfb31 am 21157abc: am 8814bd1d: Merge "include: cleanup for -Wsystem-header"
* commit '21157abcd932e899032689dba120d4f7cb08aa23':
  include: cleanup for -Wsystem-header
2014-05-23 22:31:24 +00:00
Mark Salyzyn
4887842c92 include: cleanup for -Wsystem-header
- warnings as errors, or errors introduced when -Wsystem-header
  was experimentally introduced.

Change-Id: Ia8f5b3c1c1096e191741223d52526aa48c7f1cc4
2014-05-23 15:09:57 -07:00
John Reck
d83186c444 Add VirtualLightRefBase
Change-Id: I040db87d9e87ba0584e7e5bdd72f0c319a522fa1
2014-05-09 15:27:22 -07:00
Igor Murashkin
8481765738 Merge "libutils: Clarify Condition::signal wakes up exactly one thread" 2014-04-15 22:50:02 +00:00
Igor Murashkin
db4193833c libutils: Clarify Condition::signal wakes up exactly one thread
Contrary to POSIX pthread_cond_signal guarantees, bionic will wake up
either zero or one threads.

Change-Id: I628fcd4d5bd8d5290104506f86caa82c54142230
2014-04-15 15:40:41 -07:00
John Reck
8af196c1f5 Merge "Add a peekOldestValue" 2014-04-14 20:17:53 +00:00
Andreas Gampe
02c9460a0a BitSet32 64b compatibility fix
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
2014-04-11 22:41:46 -07:00
John Reck
9d8707c75a Add a peekOldestValue
Change-Id: I89d8ea14c8ac02653d9c0e1fe24a4b17bb9c87f5
2014-04-11 19:14:15 -07:00
Tim Murray
4854a36e2a am 1f87d3ab: am 83fd6375: am 31631861: Merge "Add guards to prevent typedefs when C++11 is available."
* commit '1f87d3ab8c384d03d1496c63f7faad15bd5eeba9':
  Add guards to prevent typedefs when C++11 is available.
2014-04-07 22:12:07 +00:00
Tim Murray
1f87d3ab8c am 83fd6375: am 31631861: Merge "Add guards to prevent typedefs when C++11 is available."
* commit '83fd6375f6d9016afe9bb03453d39b8c41cda548':
  Add guards to prevent typedefs when C++11 is available.
2014-04-07 22:06:38 +00:00
Tim Murray
ae83f84548 Add guards to prevent typedefs when C++11 is available.
char32_t and char16_t are both defined in C++11.

Change-Id: I44fe8f4f05f230c18a1b77fa21b6a40c8f8ecc2d
2014-04-07 14:11:21 -07:00
Michael Wright
a45ff0f586 am df33e8b5: Add BitSet64. DO NOT MERGE
* commit 'df33e8b544c457e4b08e8fa0b8a3eaf5eaf8fc2e':
  Add BitSet64. DO NOT MERGE
2014-03-26 19:29:05 +00:00
Michael Wright
df33e8b544 Add BitSet64. DO NOT MERGE
Change-Id: Idf3e21dfaa9f90f4dcb1b4d41eed3891dda99561
2014-03-24 16:51:01 -07:00
Wonsik Kim
c4cc584bbd Clarify ownership for NativeHandle::mHandle
Change-Id: I0835278df1aa78f10d5493d7ef2c9e4a15c0fee9
2014-03-24 11:40:36 +09:00
Michael Wright
2ec064597c Add static methods to BitSet.
Also, moar testing.

Change-Id: I512b337a1a85a0794445fc6249af7ca39ba7c381
2014-03-19 11:23:01 -07:00
Michael Wright
74e2538b48 Add traits to BitSet64, not 32.
Change-Id: I3d41bbe47f5b02c610f69fc7824e416436d086b1
2014-03-18 17:45:37 -07:00
Michael Wright
bab6ea0bb7 Add BitSet64
Change-Id: Ia0039aae00316f42a8306a9fb8ad37269180b58c
2014-03-18 17:28:22 -07:00
Jesse Hall
29cc9ce49a Add NativeHandle, a refcounted C++ wrapper around a native_handle_t*
Change-Id: I232dfa2ad2e4a463a39e2e901e4097dffe278cc3
2014-03-05 16:12:41 -08:00
Narayan Kamath
665b0bb4f9 am bfed1360: am 1ed1d341: am 26fa5cd3: Merge "AArch64: Use negative values in error enumeration"
* commit 'bfed136068feb299b3ca8a07d6eaf5d93e3ff2a3':
  AArch64: Use negative values in error enumeration
2014-02-27 13:33:25 +00:00
Ashok Bhat
1ee7570052 AArch64: Use negative values in error enumeration
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>
2014-02-20 14:11:35 +00:00
Elliott Hughes
5c4020005b Revert "Move to the canonical UniquePtr.h."
This reverts commit 2a72c575d2.

Change-Id: Idb485f1be2906e8c1c8f0da3df186a7aade027f6
2014-02-04 23:41:22 +00:00
Elliott Hughes
2a72c575d2 Move to the canonical UniquePtr.h.
Change-Id: I5330c36d2b571acb6d3debd30b8020e33aa8a4a7
2014-02-04 11:58:51 -08:00
Christopher Ferris
6c625f6717 resolved conflicts for merge of 47fa9064 to master
Change-Id: I53fb8ff2dfbefe6246385e624c5c3525cc6f4253
2014-01-17 11:56:04 -08:00
Christopher Ferris
46756821c4 Rewrite libbacktrace to be all C++.
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
2014-01-16 16:12:29 -08:00
Christopher Ferris
bc12d6329e Move BACKTRACE_NO_TID to BACKTRACE_CURRENT_THREAD.
Use a bit better name for this. The other name was a bit confusing.

Change-Id: I1261f2ee3854a9c8b82133ad0bfbbbe48b43c9ac

(cherry picked from commit 242b1a8c7a)

Conflicts:
	libbacktrace/Backtrace.cpp
2014-01-09 15:49:39 -08:00
Christopher Ferris
038ac694b3 Move CallStack to libbacktrace.
Fix a small bug in the Printer for strings that didn't properly
prepend the prefix.

(cherry picked from commit 9b0e074c6d)

Change-Id: I78bfa3f76864c34f33fb439bf20dfc85616f1077
2014-01-09 15:09:13 -08:00
Brian Carlstrom
0e90bb97cb am 137ab19a: am b37b53bf: am 87942c9a: am b3bfe881: Merge "Make libutils Looper independent of frameworks/native"
* commit '137ab19a0a196a419636b078f94aef23b1172335':
  Make libutils Looper independent of frameworks/native
2013-12-19 07:58:21 +00:00
Brian Carlstrom
1693d7e48f Make libutils Looper independent of frameworks/native
Change-Id: I1dacca10a3cd7601abc3451b69ed761bf71c38fe
2013-12-18 22:32:13 -08:00
Christopher Ferris
242b1a8c7a Move BACKTRACE_NO_TID to BACKTRACE_CURRENT_THREAD.
Use a bit better name for this. The other name was a bit confusing.

Change-Id: I1261f2ee3854a9c8b82133ad0bfbbbe48b43c9ac
2013-11-12 12:14:51 -08:00
Christopher Ferris
9b0e074c6d Move CallStack to libbacktrace.
Fix a small bug in the Printer for strings that didn't properly
prepend the prefix.

Change-Id: I33c63841ef6e07728ab3195886539d82b38ee19a
2013-11-06 12:37:14 -08:00
Igor Murashkin
de2eae31b3 am 39f18c9e: am 1b84e0a3: Merge "utils: Add ProcessCallStack to collect 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
2013-10-30 14:18:46 -07:00
Igor Murashkin
ec79ef2e7b utils: Add ProcessCallStack to collect stack traces for all threads in a process
- Also add a Printer class (print lines to logcat, fd, or strings)

Bug: 11324229
Change-Id: I78435ed49aa196a0efb45bf9b2d58b62c41737d3
2013-10-25 19:24:56 -07:00