Commit graph

471 commits

Author SHA1 Message Date
Elliott Hughes
c02f81cccb Always unlink /dev/__kmsg__.
Whether the open succeeds or fails, we should unlink.

Change-Id: Ic2f1e10dc7b6d6e459c56049da00d165bd63ba8f
2015-03-28 09:51:54 -07:00
Elliott Hughes
da40c00137 Log more timing information from init.
Also make important events in init's life NOTICE rather than INFO,
and ensure that NOTICE events actually make it to the kernel log.

Also fix the logging so that if you have a printf format string
error, the compiler now catches it.

Also give messages from init, ueventd, and watchdogd distinct tags.
(Previously they'd all call themselves "init", and dmesg doesn't
include pids, so you couldn't untangle them.)

Also include the tag in SELinux messages.

Bug: 19544788
Change-Id: Ica6daea065bfdb80155c52c0b06f346a7df208fe
2015-03-28 00:25:22 -07:00
Richard Uhler
7d451ab96d Define atrace_* functions for both target and host.
This change defines atrace_* functions for the host that act as
no-ops, which makes it easier to add tracing in ART.

Change-Id: I89397e83986686a2b6a6f245c25017eb379081b1
2015-03-27 14:58:30 -07:00
Richard Uhler
a0115bf78d Merge "Add make target for shared libcutils on host." 2015-03-25 15:48:42 +00:00
Richard Uhler
acb31ba905 Add make target for shared libcutils on host.
Needed by host dex2oat.

Change-Id: Ia5b53136de3d531c820f03c3f251e58418204be1
2015-03-24 14:46:01 -07:00
Christopher Ferris
fc3576f675 Fix mac sdk build.
Add include files for types and functions that were not included properly.

Change-Id: I4849f5bdf535c6eec9254228cf980c30d11a5a1b
2015-03-23 21:40:30 -07:00
Dan Albert
483060208c More Mac fix.
Change-Id: I7a1f726819c68eea1afb7e45f92954325f8933e1
2015-03-23 16:38:46 -07:00
Dan Albert
e308104390 Undo mac fix to fix windows, fix mac differently.
Change-Id: I7d1ee439d25e17c31c0be448e67a90a0f626ff42
2015-03-23 16:07:42 -07:00
Dan Albert
728b13f08d (Probably) fix the mac build.
Change-Id: I4209f2d66d8701df2f32dcfb79abea9ea6d3dc69
2015-03-23 14:48:05 -07:00
Dan Albert
7dfb61dcdc Move gettid() into libcutils.
Change-Id: Ic8a15036833e6d129b7998d954b804be391de399
2015-03-23 13:01:21 -07:00
Nick Kralevich
5e14f416af am 6864e673: Merge "More SOCK_CLOEXEC"
* commit '6864e6739027adf725ced33777d3e21f80a95479':
  More SOCK_CLOEXEC
2015-02-27 23:19:11 +00:00
Nick Kralevich
6d3cddb2e2 More SOCK_CLOEXEC
Change-Id: I3e18f34d08a6443aaf55d7c91c27867840ac1773
2015-02-26 13:32:52 -08:00
Narayan Kamath
d9ee5ff49f am f1ac6917: Merge "Remove loghack.h."
* commit 'f1ac6917da172dd3e6829bac41fcbf23e96da079':
  Remove loghack.h.
2015-02-21 10:15:55 +00:00
Narayan Kamath
453a332812 Remove loghack.h.
This was supposedly used to enable logging when !HAVE_ANDROID_OS
but it's only used in a file that's target specific.

Change-Id: Id83f2597e48a66b4821fc3b1237e212872b909fb
2015-02-21 09:46:31 +00:00
Andreas Gampe
dc941b5f37 am 623eebe6: Merge "Libcutils: Remove unused variable"
* commit '623eebe68f3c6c9e54cf5b186696052d2948410c':
  Libcutils: Remove unused variable
2015-02-20 01:02:45 +00:00
Andreas Gampe
7f71a45a17 Libcutils: Remove unused variable
Change-Id: I95eed017e78468c4946b2a5b62b6fe92e256673e
2015-02-19 16:54:32 -08:00
Elliott Hughes
7faec394d1 am 3bc8ae63: Merge "Use mkstemp for host ashmem."
* commit '3bc8ae63ce3bbcc0ab61def99a4e9b4822ba3f51':
  Use mkstemp for host ashmem.
2015-02-10 16:52:44 +00:00
Elliott Hughes
2004a863dc Use mkstemp for host ashmem.
Bug: 19310167
Change-Id: Ic4e32b3924a9aa0b0d095d445108cbcf2231cd91
2015-02-09 12:49:53 -08:00
Elliott Hughes
8a2634c2ab am 55732f49: Merge "android_reboot should take a const char*."
* commit '55732f49287a75f9baabe9f150443aec9234c90d':
  android_reboot should take a const char*.
2015-02-04 01:20:40 +00:00
Elliott Hughes
0068da6a93 android_reboot should take a const char*.
The kernel argument is actually a void*, but it's only read from.

Change-Id: I305c50249bf12b7fbdea4721257aed52a0372f8d
2015-02-03 15:44:16 -08:00
Yabin Cui
631965a32e am e862350b: Merge "Kill HAVE_PTHREADS."
* commit 'e862350bb2eb3d3eda526da7f3b6d5c2dd40a445':
  Kill HAVE_PTHREADS.
2015-01-27 22:45:14 +00:00
Yabin Cui
4a6e5a3b64 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
2015-01-27 14:23:22 -08:00
Christopher Ferris
bd3bbff674 am d426a4e7: Merge "Move 32 bit/64 bit check into debuggerd."
* commit 'd426a4e7b62c18124827868ddbf8987aa433451b':
  Move 32 bit/64 bit check into debuggerd.
2015-01-22 00:13:01 +00:00
Christopher Ferris
9774df6134 Move 32 bit/64 bit check into debuggerd.
On 64 bit systems, calls to dump_backtrace_to_file or dump_tombstone
try and directly contact the correct debuggerd (32 bit vs 64 bit)
by reading the elf information for the executable.
Unfortunately, system_server makes a call to dump_backtrace_to_file
and it doesn't have permissions to read the executable data, so it
defaults to always contacting the 64 bit debuggerd.
This CL changes the code so that all dump requests go to the 64 bit
debuggerd, which reads the elf information and redirects requests for
32 bit processes to the 32 bit debuggerd.

Testing:

- Forced the watchdog code in system_server to dump stacks and
  verified that all native stacks are dumped correctly.
- Verified that dumpstate and bugreport still properly dump the native
  processes on a 64 bit and 32 bit system.
- Intentionally forced the 64 bit to 32 bit redirect to write only a
  byte at a time and verified there are no errors, and no dropped data.
- Used debuggerd and debuggerd64 to dump 32 bit and 64 bit processes
  seemlessly.
- Used debuggerd on a 32 bit system to dump native stacks.

Bug: https://code.google.com/p/android/issues/detail?id=97024
Change-Id: Ie01945153bdc1c4ded696c7334b61d58575314d1
2015-01-20 17:22:07 -08:00
Elliott Hughes
bb604524fb am 45c4c06f: Merge "Remove unused cruft from libcutils."
* commit '45c4c06ffe6f38e0f77f37f488e07f2537eddd45':
  Remove unused cruft from libcutils.
2015-01-16 16:02:24 +00:00
Jeff Sharkey
7c42c7f84f am 9f72ef89: Merge "Extend to receive NFLOG packets."
* commit '9f72ef8944a93bd333c6c7f87c7f7d79207ae663':
  Extend to receive NFLOG packets.
2015-01-16 06:07:29 +00:00
Elliott Hughes
f21717cd87 Remove unused cruft from libcutils.
Change-Id: I316d39e8e0a9aa385d8e1f37678b8bf2c03441eb
2015-01-15 21:16:03 -08:00
Jeff Sharkey
9f72ef8944 Merge "Extend to receive NFLOG packets." 2015-01-16 01:11:02 +00:00
Christopher Ferris
fa41e0f5c8 Add timed versions of stack dumping functions.
Under some unknown circumstances, debuggerd could become unresponsive.
If you try and take a bugreport during this time, it will hang forever.
Adding functions that have a timeout will allow dumpstate to stop if
dumping is taking too long.

Bug: 18766581

(cherry picked from commit 5f2ff6a910)

Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
2015-01-15 15:34:21 -08:00
Jeff Sharkey
9a20e67fa6 Extend to receive NFLOG packets.
Packets captured and logged by the NFLOG target are unicast, so
extend to catch and decode them.  To avoid escaping issues, the raw
contents are passed around as hex strings.

Bug: 18335678
Change-Id: Ib7299500baa00080a1f000f9da843eb527363353
2015-01-15 12:50:59 -08:00
Christopher Ferris
844c7ccc0a am 5f2ff6a9: Add timed versions of stack dumping functions.
* commit '5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38':
  Add timed versions of stack dumping functions.
2015-01-15 01:48:27 +00:00
Christopher Ferris
5f2ff6a910 Add timed versions of stack dumping functions.
Under some unknown circumstances, debuggerd could become unresponsive.
If you try and take a bugreport during this time, it will hang forever.
Adding functions that have a timeout will allow dumpstate to stop if
dumping is taking too long.

Bug: 18766581
Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
2015-01-14 15:24:33 -08:00
Elliott Hughes
4d9ddb14c0 am ec556521: Merge "Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER."
* commit 'ec556521e23f66ea52e41a7d9540b2dec31766c5':
  Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER.
2015-01-12 22:28:11 +00:00
Elliott Hughes
ae52165490 Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER.
Change-Id: I3d92dbecebd2bb449a8c4332de684919a58847ad
2015-01-12 13:56:34 -08:00
Yabin Cui
28175b0221 am fdb3da59: Merge "Use getmntent when accessing /proc/mounts."
* commit 'fdb3da5953b70dc87a05d28c31cb0dc06b8181aa':
  Use getmntent when accessing /proc/mounts.
2015-01-06 18:17:41 +00:00
Yabin Cui
d6bd9bf459 Use getmntent when accessing /proc/mounts.
Bug: 18887435
Change-Id: I6d7f95bbdb976428d4722bd640745e73c9839160
2015-01-05 20:28:36 -08:00
Elliott Hughes
f8328e7744 am 0e74cfb6: Merge "Fix references to HAVE_PRCTL."
* commit '0e74cfb677319c0f006dcc81f74fb21956807d2a':
  Fix references to HAVE_PRCTL.
2014-12-15 23:19:51 +00:00
Elliott Hughes
292ccd3c18 Fix references to HAVE_PRCTL.
Change-Id: I8343b398f2ce0d743487fdd086e67763c7dd67f1
2014-12-15 12:52:53 -08:00
Elliott Hughes
27484f2e74 am fae953eb: Merge "HAVE_ANDROID_OS implies that you have <pthread.h> and <sched.h>."
* commit 'fae953ebccfabfa500b3ebca93202063c8e3501d':
  HAVE_ANDROID_OS implies that you have <pthread.h> and <sched.h>.
2014-12-15 02:00:31 +00:00
Elliott Hughes
6acf3d7703 HAVE_ANDROID_OS implies that you have <pthread.h> and <sched.h>.
Change-Id: Ica7940c00d1d5da9d50711fd138dd459deec9b6d
2014-12-14 16:51:36 -08:00
Andreas Gampe
422ced07e5 am 374de72b: Merge "Libcutils: Remove unused variable"
* commit '374de72bbc218198e6a5f09ae4da853d02199b5c':
  Libcutils: Remove unused variable
2014-11-25 18:51:52 +00:00
Andreas Gampe
50c15f980d Libcutils: Remove unused variable
For build-system CFLAGS clean-up, remove unused variable.

Change-Id: Iaf6dd7b84ee4ef4734a48b37a4d0ca8287ca5fb5
2014-11-24 10:04:56 -08:00
Elliott Hughes
88cc0aded6 am eda16b98: Merge "Kill LOCAL_SOCKET_NAMESPACE."
* commit 'eda16b98dce3ef4c75b7b46c6acdab2b6970f54a':
  Kill LOCAL_SOCKET_NAMESPACE.
2014-11-22 07:56:37 +00:00
Elliott Hughes
9768d24fa0 Kill LOCAL_SOCKET_NAMESPACE.
Change-Id: I18928f89f66c37be310c45ff4c05a6d47ab84f66
2014-11-21 22:50:20 -08:00
Elliott Hughes
ba96de5f65 am 3ef0460e: Merge "Remove the error-prone TARGET_CPU_SMP from system/core."
* commit '3ef0460e86f2a7c5442bcf424b8e83fdfb8e3669':
  Remove the error-prone TARGET_CPU_SMP from system/core.
2014-11-17 19:40:16 +00:00
Elliott Hughes
e9ca709a73 Remove the error-prone TARGET_CPU_SMP from system/core.
This means that code that uses libcutils no longer has to ensure that
it's set ANDROID_SMP in the calling code's Android.mk for this to
function correctly.

Change-Id: I80c7ff170cd621106f34d6b74689d6b4f03e4eb7
2014-11-17 11:16:59 -08:00
Dan Albert
a57aacbaef am 29a34a5e: Merge "Disable the static libcutils tests."
* commit '29a34a5e7c249046a995a140ba30fa10960c7d42':
  Disable the static libcutils tests.
2014-11-14 21:47:40 +00:00
Dan Albert
bb28776db0 Disable the static libcutils tests.
The static libcutils tests cannot be built when using libc++ because
there are multiple symbol definition errors between libc++ and libgcc.

Bug: 18389856
Change-Id: I6f41c561f97b3a37477f844e9abf6551524a0fa3
2014-11-14 10:56:34 -08:00
Hans Boehm
0b7f368442 am 64d7117e: Merge "Second attempt to "Rewrite atomic.h to use stdatomic.h.""
* commit '64d7117efc7f7b8b477cd216a119b07041d8f406':
  Second attempt to "Rewrite atomic.h to use stdatomic.h."
2014-11-14 00:26:51 +00:00
Hans Boehm
c56648948c Second attempt to "Rewrite atomic.h to use stdatomic.h."
This should not be committed until win_sdk and aarch64 builds are
fixed in the presence of this CL.

This reverts commit 2789faabfa.

We additionally remove uniprocessor support from the earlier CL,
thus avoiding a potential compiler code reordering issue.

Change-Id: I7207a5ca2efa907a6f757f172d7090a62b2311fe
2014-11-13 15:59:10 -08:00
Dan Albert
21d8d89c7c am 06279285: Merge "Revert "Move some tests to libc++.""
* commit '06279285ae38b58988a9431c89b8689d8e16904e':
  Revert "Move some tests to libc++."
2014-11-12 05:50:56 +00:00
Dan Albert
1d3b492bde Revert "Move some tests to libc++."
The build system is still linking both libgcc and libcompiler-rt,
which is causing duplicate symbol errors on some architectures. This
requires a fix in the build system, so reverting for now.

This reverts commit e3cccbfd47.
2014-11-11 21:42:27 -08:00
Dan Albert
498c8135b4 am 7d196df6: Merge "Move some tests to libc++."
* commit '7d196df6f9990b5c93e0661fb0867971da7e6c34':
  Move some tests to libc++.
2014-11-12 02:52:59 +00:00
Dan Albert
e3cccbfd47 Move some tests to libc++.
Bug: 15193147
Change-Id: I93244e4a5d0c751056910ec8005a92401d305716
2014-11-11 23:59:02 +00:00
Elliott Hughes
aeac9cd1b3 am 85507404: Merge "Remove dead code."
* commit '855074043144e74156972e7a3416808dc6696452':
  Remove dead code.
2014-11-08 20:11:53 +00:00
Elliott Hughes
9a092dd373 Remove dead code.
__APPLE__ => HAVE_FUNOPEN.

Change-Id: I191cccd9b75020ffbb3281283ce1f1b7abc15d22
2014-11-08 11:32:07 -08:00
Michael Lentine
98a51de1cc Merge "Fix native_handle_create to check if malloc fails" into lmp-mr1-dev
automerge: b542285

* commit 'b5422854361be038b812f1c0272c66cdb4618a4b':
  Fix native_handle_create to check if malloc fails
2014-11-04 00:04:42 +00:00
Michael Lentine
2b8852dece Fix native_handle_create to check if malloc fails
Bug: 18076253
Change-Id: I8dbe3af88f52f18f74a3ab857fea53ae7585e2f7
2014-11-03 13:48:15 -08:00
Chih-Hung Hsieh
6ea35520fd am 07f1300c: am 7979f1ce: Merge "Do not inline rarely used trace function bodies."
* commit '07f1300c4c4f7d3c0df540bf8df3443c3f4539cd':
  Do not inline rarely used trace function bodies.
2014-10-15 17:57:07 +00:00
Chih-Hung Hsieh
c37387a4cd am 07f1300c: am 7979f1ce: Merge "Do not inline rarely used trace function bodies."
* commit '07f1300c4c4f7d3c0df540bf8df3443c3f4539cd':
  Do not inline rarely used trace function bodies.
2014-10-15 17:57:07 +00:00
Chih-Hung Hsieh
2d3150e736 Do not inline rarely used trace function bodies.
When atrace_* functions are inlined,
the rarely used 1024-byte buffers are allocated on stack.

BUG: 17444504
Change-Id: I773512aeb70e8b79f3803c6d59cba064d2aa65b6
2014-10-14 15:37:20 -07:00
Riley Andrews
d1380d645d am 33b33549: Merge "Make the default cgroup, the foreground cgroup." into lmp-mr1-dev
* commit '33b335495c7b8eea4b9af13a7157cf83cd085129':
  Make the default cgroup, the foreground cgroup.
2014-10-08 20:51:48 +00:00
Riley Andrews
522d72b702 Make the default cgroup, the foreground cgroup.
All kernel services will now be in the same cgroup as
foreground applications. This will now make kernel threads
not implicitly higher priority than android foreground
services.

Bug 17681097

Change-Id: I28e81c7aade50428d5395df86f00ce01c1e7af02
2014-10-07 19:24:54 +00:00
Chih-Hung Hsieh
ddb3fe8c17 am ad0ff1d9: am 4fceda2b: Merge "Add -no-integrated-as at local level."
* commit 'ad0ff1d99cd00ce53f667b27e53f44e802315a36':
  Add -no-integrated-as at local level.
2014-10-06 22:37:48 +00:00
Chih-Hung Hsieh
2aaccfe590 am ad0ff1d9: am 4fceda2b: Merge "Add -no-integrated-as at local level."
* commit 'ad0ff1d99cd00ce53f667b27e53f44e802315a36':
  Add -no-integrated-as at local level.
2014-10-06 22:37:06 +00:00
Chih-Hung Hsieh
60c57dad4e Add -no-integrated-as at local level.
Later we will enable integrated-as as default at the global level.

BUG: 17820427
Change-Id: I1beed3e75d074d970fa9112ec1c0f0df3d43947a
2014-10-06 13:33:25 -07:00
Hans Boehm
f381920b58 am 072877af: am 41198eea: Merge "Revert "Rewrite atomic.h to use stdatomic.h.""
* commit '072877af485d49f11e227c0d22a7bb4a341533d6':
  Revert "Rewrite atomic.h to use stdatomic.h."
2014-10-04 02:17:43 +00:00
Hans Boehm
054627df6b am 072877af: am 41198eea: Merge "Revert "Rewrite atomic.h to use stdatomic.h.""
* commit '072877af485d49f11e227c0d22a7bb4a341533d6':
  Revert "Rewrite atomic.h to use stdatomic.h."
2014-10-04 02:09:19 +00:00
Hans Boehm
2789faabfa Revert "Rewrite atomic.h to use stdatomic.h."
This reverts commit cb344d4640.

Change-Id: Ib17cd8d00695062177ce863cedc4ec7148012317
2014-10-04 00:49:06 +00:00
Hans Boehm
954fc61b6b am f5204549: am 028928fe: Merge "Rewrite atomic.h to use stdatomic.h."
* commit 'f5204549faf7310cc808bcb3676fb36268178e26':
  Rewrite atomic.h to use stdatomic.h.
2014-10-04 00:06:45 +00:00
Hans Boehm
2ac8207e50 am f5204549: am 028928fe: Merge "Rewrite atomic.h to use stdatomic.h."
* commit 'f5204549faf7310cc808bcb3676fb36268178e26':
  Rewrite atomic.h to use stdatomic.h.
2014-10-04 00:06:30 +00:00
Hans Boehm
cb344d4640 Rewrite atomic.h to use stdatomic.h.
Replace atomic-inl.h with a file that just includes atomic.h.
Remove platform specific implementations.

Change-Id: If16d74fbe0af7836ed8c1296c17e13a2d0d20f64
2014-10-01 17:37:20 -07:00
Dan Albert
c4affb2b4e am be0d295d: am 19d686ee: Merge "Don\'t manually link stlport."
* commit 'be0d295da912076239a1e112c4b7b94be10cf7af':
  Don't manually link stlport.
2014-09-26 19:53:04 +00:00
Dan Albert
31171b6e31 am be0d295d: am 19d686ee: Merge "Don\'t manually link stlport."
* commit 'be0d295da912076239a1e112c4b7b94be10cf7af':
  Don't manually link stlport.
2014-09-26 19:53:04 +00:00
Dan Albert
b50af2bc60 Don't manually link stlport.
Change-Id: I60d2bc868fb9052f120103e9675046ef54f510d0
2014-09-26 10:37:30 -07:00
Elliott Hughes
f9cdbb1a30 am 6c03b85f: am 32e2f1be: Merge "Clean up memset[16,32] routines: unify files names, remove redundant wrapper for 32-bit, remove Atom caches sizes for 64-bit, fix license."
* commit '6c03b85f1dcfd0efd2ec741cbfb6c5ecc404fbd8':
  Clean up memset[16,32] routines: unify files names, remove redundant wrapper for 32-bit, remove Atom caches sizes for 64-bit, fix license.
2014-09-18 03:23:47 +00:00
Elliott Hughes
bdac720255 am 6c03b85f: am 32e2f1be: Merge "Clean up memset[16,32] routines: unify files names, remove redundant wrapper for 32-bit, remove Atom caches sizes for 64-bit, fix license."
* commit '6c03b85f1dcfd0efd2ec741cbfb6c5ecc404fbd8':
  Clean up memset[16,32] routines: unify files names, remove redundant wrapper for 32-bit, remove Atom caches sizes for 64-bit, fix license.
2014-09-18 03:23:08 +00:00
Varvara Rainchik
458d1253f5 Clean up memset[16,32] routines: unify files names, remove redundant wrapper
for 32-bit, remove Atom caches sizes for 64-bit, fix license.

Change-Id: Ieda6367d7b21cf25b2beda6dd8d77cf668d3f2af
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-09-17 18:11:18 +04:00
Christopher Ferris
6bcc4acc6f Use the correct debuggerd given the tid.
On 64 bit systems, calling dump_backtrace_to_file will automatically
call debuggerd64. If the process to dump is actually 32 bit, this
creates an unrecognizable dump backtrace. Modify the code to check the
type of the process and connect to the appropriate debuggerd process.

This change refactors both the tombstone and backtrace functionality to
allow both to work properly on 64 bit systems when dealing with mixed
processes.

Bug: 17487122

(cherry picked from commit a9fa7b87f1)

Change-Id: I3c9e0212c8720877a6af092071a3695df2a36df8
2014-09-13 16:22:17 -07:00
Christopher Ferris
07bb3f1e0b am 07dda6b5: Merge "Use the correct debuggerd given the tid." into lmp-dev
* commit '07dda6b57c6a476177b68ad42966f24cbbdb04c1':
  Use the correct debuggerd given the tid.
2014-09-13 22:54:00 +00:00
Christopher Ferris
a9fa7b87f1 Use the correct debuggerd given the tid.
On 64 bit systems, calling dump_backtrace_to_file will automatically
call debuggerd64. If the process to dump is actually 32 bit, this
creates an unrecognizable dump backtrace. Modify the code to check the
type of the process and connect to the appropriate debuggerd process.

This change refactors both the tombstone and backtrace functionality to
allow both to work properly on 64 bit systems when dealing with mixed
processes.

Bug: 17487122
Change-Id: Icf123a6f4508b1aeec073663aa1a0ceae5380aa1
2014-09-12 20:12:11 -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
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
Dan Albert
dccbb07dfb am a66532e7: am 91baad56: Merge "Fix some clang compilation issues."
* commit 'a66532e73a9c8205002482477f1bf53366d15f38':
  Fix some clang compilation issues.
2014-09-11 17:48:39 +00:00
Dan Albert
949aa23898 Fix some clang compilation issues.
Use expected inline behavior with clang.

GCC defaults to -std=gnu90, giving C89 inline semantics with GNU
extensions. Clang defaults to C99. Explicitly use gnu90.

Mark an unused parameter as __unused.

Fix some incorrect casts.

Change-Id: I05b95585d5e3688eda71769b63b6b8a9237bcaf4
2014-09-11 17:17:32 +00:00
Elliott Hughes
176fe9005d am 4592d73e: am a59b6ac6: Merge "Only the Mac doesn\'t have open_memstream."
* commit '4592d73e18684b8ba2addb97433eed4cf389e386':
  Only the Mac doesn't have open_memstream.
2014-08-21 03:16:26 +00:00
Elliott Hughes
3ff8888f66 Only the Mac doesn't have open_memstream.
We should probably move this into art, since they're the only people using it.

Bug: 17164505
Change-Id: I67b8f0cbad4c6368d4424e6979d6b044dd36aa37
2014-08-20 16:16:24 -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
a613844e13 am e07a6e63: am 6d9a5ac3: Merge "[MIPSR6] Skip pixelflinger, memset assembler code on mips32r6"
* commit 'e07a6e6337a959c45ab71acf6ff1fad8a8ac5dfd':
  [MIPSR6] Skip pixelflinger, memset assembler code on mips32r6
2014-08-05 21:43:16 +00:00
Duane Sand
734f50c2fe [MIPSR6] Skip pixelflinger, memset assembler code on mips32r6
Temporarily use generic C-coded libpixelflinger & memset on mips32r6.

Change-Id: I629b11ba955eaba323cba1df96c39f75f4d24d62
2014-07-31 16:21:16 -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
Elliott Hughes
400c381835 Move sched_policy.c off bionic's PR_SET_TIMERSLACK_PID.
Change-Id: I3a27803d46b5b88a10aa8043a114d780ed685e56
2014-07-17 17:15:14 -07:00
Elliott Hughes
e07d77e422 Use <sys/prctl.h> instead of <linux/prctl.h>.
Change-Id: I708da00e36a9da8be9184c451453774be6b78c06
2014-07-11 20:58:55 -07:00
Christopher Ferris
1472dd465c am f77cf6c6: am 5450a441: am 676f3755: Merge "Add android_memset16/android_memset32 for aarch64."
* commit 'f77cf6c6986057aceece5d7e09d1c23a9efaf20c':
  Add android_memset16/android_memset32 for aarch64.
2014-06-24 19:38:51 +00:00
Christopher Ferris
d660d895c1 Add android_memset16/android_memset32 for aarch64.
Included new unit tests for these functions.

Bug: 15456369

Change-Id: I3fac02f61c62d15d54d0df51957680d7155e98ae
2014-06-23 19:28:33 -07:00
Igor Murashkin
1f7f70a629 libcutils: Fix warnings in properties.c when verbose logging is enabled
Change-Id: I07c5eb59b9395734ad3fc25eba753564c0f096a0
2014-06-20 15:57:09 -07:00
Igor Murashkin
d8f2a8d34a cutils: Add property_get_bool, _get_int32, _get_int64
* Read out system properties with same syntax as SystemProperties.java
* Also adds unit test suite to validate correctness of properties
* Also fixes buffer overrun in property_get

(cherry picked from commit d4507e9246)

Change-Id: Ifd42911f93e17da09e6ff1298e8875e02f3b6608
2014-06-20 20:01:49 +00:00
Nick Kralevich
30a86ebc7a fs_mkdirs: use O_NOFOLLOW and O_CLOEXEC
Don't follow symlinks. Suggestion from Jann Horn.

Also, add O_CLOEXEC. This prevents file descriptor leakage should
this code ever run in a multithreaded environment.

I'm not sure if either of these changes actually address any
security concerns, but it's harmless, so go ahead and add it.

Bug: 15675141
Change-Id: I7ba4e9d10439b7150f59759b54e3ad8ccba411e3
2014-06-16 15:40:40 -07:00
Dan Albert
232c711795 am 46ed1c8c: am ed1a0dbd: am b44e626c: Merge "Fix windows sdk build."
* commit '46ed1c8c99fce33c78e239d4155ece84feca069d':
  Fix windows sdk build.
2014-06-13 10:24:51 +00:00
Dan Albert
9ea2ad5796 am 6dfe9495: am 9b2d964d: am 08430b1e: Merge "Use syscall(2) instead of ioprio_get/ioprio_set."
* commit '6dfe949568fa9413db72cdccb26baca2c4592a2a':
  Use syscall(2) instead of ioprio_get/ioprio_set.
2014-06-13 03:04:23 +00:00
Dan Albert
5e541bf47d Fix windows sdk build.
Change-Id: I53c9f43a5f9ae2f40de686316185d162d0e0503a
2014-06-13 04:09:37 +00:00
Dan Albert
167c0ed6da Use syscall(2) instead of ioprio_get/ioprio_set.
Change-Id: Ibfd0bdd3dd0bad9804ec9fd9292f4b68a510afdb
2014-06-12 19:48:10 -07:00
Christopher Ferris
45e2756409 am f6d8dedd: am 8af98621: am 5db5b8aa: Merge "Port libcutils memset16/32 to x86_64."
* commit 'f6d8dedd87eb8bbccbbdeb17a6d226f089449d92':
  Port libcutils memset16/32 to x86_64.
2014-06-06 17:26:01 +00:00
Henrik Smiding
86a1600fb6 Port libcutils memset16/32 to x86_64.
Port libcutils memset16/32 assembly SSE2 optimizations to x86_64
architecture. Ensures the same performance on 64-bit arch.

Change-Id: I874a71a884c0d28a152933ddff9cb886c9a6e99e
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
2014-06-05 18:51:44 -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
59ec765382 Host multilib build of both 32-bit and 64-bit libraries.
Change-Id: I54f91f385b109fc664a1a1f9320affb2a846fef1
2014-06-05 15:26:22 -07:00
Elliott Hughes
a0c01818a2 am e7110ac0: am b122da64: Merge "Fix libcutils/dlmalloc_stubs.c build breakage."
* commit 'e7110ac09bdc77c4a8f7823aa666c9929a33984c':
  Fix libcutils/dlmalloc_stubs.c build breakage.
2014-06-04 04:09:52 +00:00
Elliott Hughes
b122da648d Merge "Fix libcutils/dlmalloc_stubs.c build breakage." 2014-06-04 03:50:33 +00:00
Elliott Hughes
7f0ef73e70 Fix libcutils/dlmalloc_stubs.c build breakage.
Change-Id: I344c410c100ce13c7a88063bf5354ad61c50094b
2014-06-03 20:48:44 -07:00
Mathieu Chartier
39526f7740 am 04511126: am d586e356: Merge "Fix build."
* commit '04511126a6e127705abce84735a3fe4eb48d882c':
  Fix build.
2014-06-04 01:42:00 +00:00
Mathieu Chartier
e942d1f9ea Fix build.
Change-Id: I7b0cf6a248c74f1a06e0b5d51a5be13124ced6a0
2014-06-03 18:12:29 -07:00
Mathieu Chartier
53363f4fa0 am 5a8335c3: am ed30b7ea: Merge "Fix build."
* commit '5a8335c3185ec329bf43b1edc733aef38ce76c36':
  Fix build.
2014-06-04 00:11:52 +00:00
Mathieu Chartier
0b9674f241 Fix build.
Change-Id: I6bafe6221e1ce7e4b04269df90996ab08b050e93
2014-06-03 15:32:10 -07:00
Mathieu Chartier
520a893b1a am b85c2494: am 03b87b49: Merge "Make host ashmem_create_region seed only once."
* commit 'b85c2494df1e1003b3101e36b29faace3a51dc3f':
  Make host ashmem_create_region seed only once.
2014-06-03 20:54:51 +00:00
Mathieu Chartier
03b87b49fa Merge "Make host ashmem_create_region seed only once." 2014-06-03 19:02:35 +00:00
Mathieu Chartier
1104ae8cfc Make host ashmem_create_region seed only once.
Not seeding this each call should help reduce collisions when multiple
threads are calling ashmem_create_region. Also cleaned up code by
deleting gotos, and making formatting consistent.

Bug: 15394258
Change-Id: Iafdaea57b2317e0eb7c40d7b5595c523814fd88c
2014-06-03 11:47:58 -07:00
JP Abgrall
9e18975bac am c99dd0c5: am 676f7d50: am fc85a7a8: Merge "libcutils: fix rw FS remount check issue"
* commit 'c99dd0c58d2a7572740599f81b5a20ddb18dbf9e':
  libcutils: fix rw FS remount check issue
2014-06-03 01:12:15 +00:00
Hong-Mei Li
88f7683d9c libcutils: fix rw FS remount check issue
In some condition, some of FS would set disable_roll_forward option.
In this case, when we do power off or reboot, the power down progress
would stuck at android_reboot for 360 sec.
The reason is, remount_ro_done function check key word "rw" to determine
whether all the read-write FS has been remounted as read-only FS.
Unfortunately, it takes disable_roll_forward as a rw flag too by
mistake, so the check would always fail, until reach 360 sec threshold.

The patch would match "rw," from mount options, this can avoid the issue
successfully.

Change-Id: I409f9dc88c9ee5cf049615ea9dcccaf195b6bc5a
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
2014-06-02 22:45:37 -07:00
Elliott Hughes
b65208d1a9 am f7a7e3c3: am 6dfb039b: am 4a343436: Merge "Fix win32 undefined reference to `_socket_network_client_timeout\'."
* commit 'f7a7e3c301fdf7d98d8bcabf6fefb0fcf5bbf90d':
  Fix win32 undefined reference to `_socket_network_client_timeout'.
2014-05-20 20:18:01 +00:00
Elliott Hughes
0bff5bd952 Fix win32 undefined reference to `_socket_network_client_timeout'.
Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
2014-05-20 12:13:29 -07:00
Elliott Hughes
5756d8873b am 87d0f45b: am 2dea56e0: am 9e0a6248: Merge "Fix Windows socket_network_client.c build failures."
* commit '87d0f45b3c30dff02bd92f542e5e9e64816f5315':
  Fix Windows socket_network_client.c build failures.
2014-05-20 00:23:11 +00:00
Elliott Hughes
3edc25271f am b42f1413: am 0e71e3ab: am 9cae50b3: Merge "Bound the ADB connect time with a non-blocking connect"
* commit 'b42f141315ae0929325335645d397db04a500c88':
  Bound the ADB connect time with a non-blocking connect
2014-05-20 00:23:08 +00:00
Elliott Hughes
36739556db Fix Windows socket_network_client.c build failures.
Change-Id: Ie67a2305ade02e078bf0edf54104c295b091b1b7
2014-05-19 16:47:12 -07:00
Ken Lierman
aecc6a6657 Bound the ADB connect time with a non-blocking connect
After a disconnect, the initial blocking connect takes
a long time to return, while subsequent calls return
quicks.  Switch to a non-blocking connect to make the
re-connect time more consistent and faster overall.

Change-Id: I21d02b22a8eb9a457c2f1fa95eb17894d5612ccd
Signed-off-by: Ken Lierman <ken.lierman@windriver.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
2014-05-19 16:16:42 -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
9f437d7181 Remove unused LOCAL_LDLIBS.
Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
2014-05-07 15:36:05 -07:00
Elliott Hughes
7cc73694fa am b389440c: am 54c90a14: am 752115dd: Merge "Add Silvermont architecture cache sizes"
* commit 'b389440c8bdc06fc6d3fdaad6acb8f9c124e40a7':
  Add Silvermont architecture cache sizes
2014-05-05 22:07:02 +00:00
Elliott Hughes
752115dda7 Merge "Add Silvermont architecture cache sizes" 2014-05-05 21:59:53 +00:00
Mark Salyzyn
e6fff56f2e am 027e4e77: am 74088995: am f2c0f328: Merge "libcutils: win_sdk build issues"
* commit '027e4e77c26652948f43ac07ca8a738c469d39f0':
  libcutils: win_sdk build issues
2014-05-05 19:38:45 +00:00
Mark Salyzyn
02a7c3a7c3 libcutils: win_sdk build issues
Change-Id: Ic431166f686aebfd0ee00ad3224b95237ff7a0de
2014-05-05 10:29:56 -07:00
Mark Salyzyn
c413e151de am b3eefcaa: am ce98dc70: am 1e10b661: Merge "libcutils: Mac build pulls in __unused from sys/cdefs.h"
* commit 'b3eefcaa934986f72a3daddf6ad86e276d14d476':
  libcutils: Mac build pulls in __unused from sys/cdefs.h
2014-05-02 22:17:57 +00:00
Mark Salyzyn
edc70938be libcutils: Mac build pulls in __unused from sys/cdefs.h
Change-Id: I2da8a52e07cef0b749f7e60709536e98bd96660e
2014-05-02 19:50:20 +00:00
Mark Salyzyn
b8f86480a2 am a0a461d3: am 82e1b89f: am a32e01d2: Merge "libcutils: turn on -Werror"
* commit 'a0a461d3b7d85484c10db64f078427a5be3da189':
  libcutils: turn on -Werror
2014-05-02 17:12:27 +00:00
Mark Salyzyn
12717169a5 libcutils: turn on -Werror
- Deal with some -Wunused / -Wunused-variable issues

Change-Id: I28c23fb213382a392ec30935749fb359e072d664
2014-05-01 17:58:17 -07:00
Elliott Hughes
84a445b4f5 am 29941ec8: am f8db4afb: am ab3d49b0: Merge "Use the si_code value bionic passes us."
* commit '29941ec81705bdcad2b43f0059e1288304c523e8':
  Use the si_code value bionic passes us.
2014-04-26 03:33:27 +00:00
Elliott Hughes
855fcc3114 Use the si_code value bionic passes us.
Bionic needs to re-raise various signals, which means the si_code
debuggerd sees has been clobbered. If bionic sends us the original
si_code value, we can use that instead of the one we see when the
ptrace the crashed process' siginfo.

Change-Id: If116a6bc667d55a6fb39b74f96673292af4e4c8c
2014-04-25 20:20:39 -07:00
Ruchi Kandoi
f4362ccdd5 Fix build problems caused by commit:
422852ef5c for non-linux hosts.

Change-Id: I00b9c99b9d9d072f19549b3a9970a27e75cd49b7
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-04-24 00:35:46 +00:00
Ruchi Kandoi
422852ef5c Set timer slack value according to thread foreground/background state.
Change-Id: Ia998f349129acf4602b767d1ff94839607fdbdbd
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-04-23 21:56:40 +00:00
Henrik Smiding
c27a444e54 Add Silvermont architecture cache sizes
Adds Silvermont specific cache sizes for memset16/32 SSE optimization.

Change-Id: Ib5ea086d57544e74ac384ee1ef516b8511392f70
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
2014-04-18 11:31:54 +08:00
Igor Murashkin
8efea957be libcutils: Fix warnings in properties.c when verbose logging is enabled
Change-Id: I07c5eb59b9395734ad3fc25eba753564c0f096a0
2014-04-15 18:06:39 -07:00
Igor Murashkin
d4507e9246 cutils: Add property_get_bool, _get_int32, _get_int64
* Read out system properties with same syntax as SystemProperties.java
* Also adds unit test suite to validate correctness of properties
* Also fixes buffer overrun in property_get

Change-Id: Ifd42911f93e17da09e6ff1298e8875e02f3b6608
2014-04-11 17:49:01 -07:00
Elliott Hughes
0693c5848d am 4fe18615: am 56d57e88: am 5f130216: Merge "Handle errno properly to avoid corrupt str_parms"
* commit '4fe186159386a75ce17ca0b7ba6ace4294187cb2':
  Handle errno properly to avoid corrupt str_parms
2014-04-04 01:53:51 +00:00
Jens Gulin
d3c8d5b8d4 Handle errno properly to avoid corrupt str_parms
A normal sequence of calls is as follows:
str_parms_create_str, str_parms_add_str, str_parms_destroy.
In some cases the destroy caused double free.

str_parms_add_str will clone the input and send it to hashmapPut
for storage. If hashmapPut did not store the strings it will raise
errno = ENOMEM and leave caller with ownership of the strings.
In any of these cases it will be safe to destroy the str_parms.

But what if it wasn't hashmapPut that said NOMEM? What if there
was a stale NOMEM already before a successful hashmapPut?
In that case the strings will be successfully added to the list
(if new), but when str_parms_add_str sees the NOMEM it will free
them anyway, leaving dangling pointers in the str_parms!!

It is the responsibility of the caller to clear errno before any
interesting call. This patch makes sure that str_parms_add_str
reacts only on errno emmitted from hashmapPut.

Change-Id: If87e4bcc482f09e1c66133d33517b152ebdac65f
2014-04-03 11:19:54 -07:00
Paul McLean
55c6407041 Adding a handy predicate function (str_parms_has_key()
Change-Id: I1af5c260a1a820b65f0850ea9adb38b01fcb183c
2014-03-25 19:08:13 +00:00
Mark Salyzyn
0c3d19ff3d Merge "libcutils: 64-bit compile issues" 2014-03-07 23:33:31 +00:00
Mark Salyzyn
0425b64e0b libcutils: 64-bit compile issues
- Use inttypes.h to print uint64_t values.

Change-Id: Ia10a3b67cadcce282563467a464ec07066cc2051
2014-03-07 15:28:43 -08:00
Alex Ray
157e1b645a libcutils: add method to get klog level
Change-Id: I55e8311bae97703be26e57b415a8ab0a6d9b4361
2014-03-07 13:58:02 -08:00