Commit graph

236 commits

Author SHA1 Message Date
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
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
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
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
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
2583dec08c am 3f4855c1: am 46f3ebba: am 28171447: Merge "cutils: trace 64-bit compile issues"
* commit '3f4855c11889470691673c15f05361df61ea95b2':
  cutils: trace 64-bit compile issues
2014-03-20 22:27:19 +00:00
Mark Salyzyn
a459d0b0e2 cutils: trace 64-bit compile issues
- switch format to PRId64 for int64_t
- switch format to PRId32 for int32_t

Change-Id: I1e66db06810000936d584ed49234550abd96cdff
2014-03-20 13:02:57 -07:00
Alex Ray
665902ee5a am db480f75: am 6a58c4f3: am 33e86e00: Merge "libcutils: add method to get klog level"
* commit 'db480f7516977123a0c5c6f6705b282d2e55ab89':
  libcutils: add method to get klog level
2014-03-08 05:46:35 +00:00
Alex Ray
157e1b645a libcutils: add method to get klog level
Change-Id: I55e8311bae97703be26e57b415a8ab0a6d9b4361
2014-03-07 13:58:02 -08:00
Nick Kralevich
202be73b62 am f10492d8: am 066cde92: am 223e0798: Merge "Enable building init with -Wall -Werror."
* commit 'f10492d8c0c907fad6f87c871fec6b2fac41a02c':
  Enable building init with -Wall -Werror.
2014-02-19 19:23:13 +00:00
Stephen Smalley
eb3f421e02 Enable building init with -Wall -Werror.
Eliminates various warnings from SELinux-related code.

Bug: 12587913
Change-Id: I28921f0ebd934324436609540d95ccef58552b64
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-02-19 09:15:09 -05:00
Elliott Hughes
a5d04cf62c am fcd4dad3: am 620a8800: am 1c1bd845: Merge "x86_64: Add atomic funtions"
* commit 'fcd4dad3967de79450549e78524ac73f775b51f2':
  x86_64: Add atomic funtions
2014-02-12 23:00:26 +00:00
Qiming Shi
4bc2f8db0a x86_64: Add atomic funtions
This patch adds atomic functions for x86_64.

Change-Id: I298c760a1e6efa2ce2c61a143f833b6785805442
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
2014-02-11 16:17:39 -08:00
Elliott Hughes
6cfb31d652 am 5cbb68cf: am da9b5dab: am 434edbe6: Merge "LP64 should have debuggerd and debuggerd64."
* commit '5cbb68cf891fa040563c70784363496cf3e05174':
  LP64 should have debuggerd and debuggerd64.
2014-02-01 01:39:18 +00:00
Elliott Hughes
e9edf7a0ef LP64 should have debuggerd and debuggerd64.
Change-Id: I4e39c200e6867bb9a5bbcfec1c449b8864028feb
2014-01-31 17:15:10 -08:00
Elliott Hughes
19750a2c30 am f1935b6d: am 2e9dcd21: am 1bc6169f: Merge "Remove dead code that looked like part of debuggerd."
* commit 'f1935b6d933861d6194bf056a844ec0f11765c38':
  Remove dead code that looked like part of debuggerd.
2014-02-01 00:52:06 +00:00
Elliott Hughes
6694d3e3d5 Remove dead code that looked like part of debuggerd.
Note that these were two different functions. The definition was unused,
and the declaration was undefined.

Change-Id: I2edd10a0ab9422cd5252bdb9ccdd726dc5fad531
2014-01-31 10:37:18 -08:00
Mark Salyzyn
a6aad4cdb3 libcutils: Move list.c to inlines on list.h
(cherry picked from commit 0ea3624b3e)

Change-Id: I0572555a194d2560e74dfbf07abcec05e9a276a2
2014-01-27 15:04:56 -08:00
Colin Cross
892af2303f am 9222d911: am c8518616: am 02f68c4b: am 4800e20e: Merge "system/core: rename aarch64 target to arm64"
* commit '9222d911a89d30a9b0537e8cdb95401be3a4999e':
  system/core: rename aarch64 target to arm64
2014-01-24 21:24:52 +00:00
Colin Cross
d4146e6091 system/core: rename aarch64 target to arm64
Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
2014-01-23 18:01:14 -08:00
Colin Cross
adc09abb85 am 7d076b3b: am b36cfdb7: am 4b53b014: am 5bd11b48: Merge changes Ib13d9654,I98723ccd
* commit '7d076b3bf32e0d211d9d27964cc74dafd65afee3':
  system/core: remove $(KERNEL_HEADERS) from includes
  libcutils: fix atomic_memory_store_barrier
2014-01-24 00:41:20 +00:00
Colin Cross
3510637c85 libcutils: fix atomic_memory_store_barrier
dmb isht is not a valid instruction, fix it to be dmb ishst
(data memory barrier, inner shareable, on writes).

Change-Id: I98723ccd8618b7863cb55da53dc29b979c9905a5
2014-01-22 19:04:28 -08:00
Elliott Hughes
49cf122d25 am 7b80c138: am 7c7d76f4: am ab3d5036: am d47ffb88: Merge "AArch64: Add atomic functions"
* commit '7b80c1381581bd3c0c28440236e043888c49087d':
  AArch64: Add atomic functions
2014-01-14 23:43:47 +00:00
Ashok Bhat
c15d2ce5fc AArch64: Add atomic functions
This patch adds atomic functions for AArch64. The functions
will be revisited later for potential optimizations using
assembly or otherwise.

This patch also introduces new 64-bit atomic functions for
LP64 platforms.

Change-Id: Id2127dd01cea65025f939e955d73d27e95d8687e
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-01-14 12:45:58 -08:00
Mark Salyzyn
0ea3624b3e libcutils: Move list.c to inlines on list.h
Change-Id: I0572555a194d2560e74dfbf07abcec05e9a276a2
2013-12-05 07:33:21 -08:00
Dmitry Shmidt
32b7108b64 Remove non-existing klog_close()
Change-Id: I49f6047b3f6d90ffa1601bd9348ae69d87b63aed
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-09-27 15:11:54 -07:00
jp abgrall
8f4c14f1e7 am 08170103: am 91962669: Merge "cutils: list: add list_for_each_safe"
* commit '0817010366feecb53fc70719b3784dd7c6d66b55':
  cutils: list: add list_for_each_safe
2013-09-25 11:36:02 -07:00
Jeff Sharkey
44d6342caa Remove mkdir() side effect, add .nomedia, utils.
Before this change, FUSE lookup() would have the side effect of
creating the directory on behalf of apps.  This resulted in most
directories being created just by Settings trying to measure disk
space.  Instead, we're switching to have vold do directory creation
when an app doesn't have enough permissions.

Create fs_mkdirs() utility to create all parent directories in a
path as needed.  Allow traversal (+x) into /storage directories.

Fix FUSE derived permissions to be case insensitive.  Mark well-known
directories as .nomedia when created.

Bug: 10577808, 10330221
Change-Id: I53114f2e63ffbe6de4ba6a72d94a232523231cad
2013-09-20 14:21:09 -07:00
Jamie Gennis
f1921c7949 trace: Add support for tracing 64-bit ints.
Bug: 10624956
Change-Id: Ie1d7c8ac16b5a5ec1e63e4fb1863f5b1ab2b59e8
2013-09-18 19:03:45 +00:00
Andrew Boie
30fb83b6e5 cutils: list: add list_for_each_safe
For when you want to modify the list whilst iterating over it.

Change-Id: I84432892890987c218e56883c35e52c9ff0240a3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-12 15:30:40 -07:00
Colin Cross
9227bd3855 Move liblog headers to system/core/include/log
Move the liblog headers to log/ instead of cutils/ to complete
the separation of libcutils and liblog.  cutils/log.h still
exists and includes log/log.h in order to support the many existing
modules that use cutils/log.h.

Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
2013-07-24 12:32:39 -07:00
Nick Kralevich
f5d79aa4bb Merge "Don't use __attribute__(__error__)" 2013-06-18 20:23:29 +00:00
Nick Kralevich
bda25e4ed5 Don't use __attribute__(__error__)
__attribute(__error__) isn't supported on clang, and generates
compiler warnings. Use __errordecl instead, which does the right thing
for different compilers.

Change-Id: Ifb0797a5de703cc5b3c39dcd97bcfaf404f1cafa
2013-06-18 12:14:47 -07:00
Tobias Grosser
9ede33233f Set ATRACE_ENABLE() to '0' if not availble
Change-Id: Iec61d275cd7b2be65f828c282f97cc59adf4cc0b
2013-06-17 18:38:02 -07:00
Dima Zavin
abb7d58010 HACK: cutils: restore record_stream temporarily
Restore the record_stream code in cutils that was removed
in e00a12bf8a as part of cutils
cleanup.

Unfortunately, there are some prebuilt vendor libs that rely on
this functionality that we cannot currently rebuild.

Remove at the earliest possible convenience once the vendor libs
have been fixed.

Bug: 9189218
Change-Id: I5d44126756f1e3ed194d1b5873d64d9154183199
Signed-off-by: Dima Zavin <dima@android.com>
2013-06-04 17:40:28 +00:00
Nick Kralevich
e44c6b7183 Merge "property_get: do argument checking." 2013-05-24 21:36:30 +00:00
Nick Kralevich
1c743de2bd Merge "properties.h: avoid duplicating constant values" 2013-05-24 21:36:22 +00:00
Tim Murray
d8b11c1ddd Add ATRACE_TAG_RS.
Change-Id: Iaff497a1cb04a797441b5bb47b30ad6f09db8e95
2013-05-23 13:46:12 -07:00
Nick Kralevich
0e54ec825e property_get: do argument checking.
Try to verify, at compile time, that the supplied
value buffer is large enough.

Change-Id: I91fa560d3ceff87609194269356ac634bdbf2ede
2013-05-23 11:05:16 -07:00
Nick Kralevich
53df3ade9b properties.h: avoid duplicating constant values
Use the constant value from sys/system_properties.h,
rather than having two copies of this constant in two
different places.

This partially addresses the TODO in the header file.

Change-Id: Ic0b098cb8caf562ed2a25a0cf8cd412ba2e06884
2013-05-23 11:05:16 -07:00
Jamie Gennis
a0e780edd3 am 6e46a3b8: am a1ee12ca: Merge "libcutils: add a trace tag for Dalvik" into jb-mr2-dev
* commit '6e46a3b8e64a7a2ca4754ed7b1f9922719bd0a9b':
  libcutils: add a trace tag for Dalvik
2013-05-08 15:03:54 -07:00
Jamie Gennis
2b68e0675b libcutils: add a trace tag for Dalvik
This change adds a trace tag bit for Dalvik.  It also allows the ATRACE_*
macros to be called from code compiled for the host with no effect.

Bug: 8856374
Change-Id: I9c17129d6cc170cae00b6500485b5b5fa4b5e647
2013-05-07 15:19:34 -07:00
Dima Zavin
e00a12bf8a cutils: first pass at cleaning up legacy/obsolete code in cutils
Removed unused code and moved libraries with single clients
near their respective users.

Change-Id: I65f90f8659f27bd0f44ca5ddf33da2bce14674c1
Signed-off-by: Dima Zavin <dima@android.com>
2013-05-07 00:19:44 -07:00
Nick Kralevich
ca8e66a8b0 Make init handle reboots
Move the responsibility for rebooting the system from the
reboot command to init. Init is in a better position to take
actions to bring the system down cleanly, including making sure
filesystems are mounted read-only.

The only UIDs which can perform an init triggered reboot are
root, system, and shell.

Modify the reboot command so that it calls into init to perform
the reboot. The reboot command no longer requires CAP_SYS_BOOT.

Remove the -n reboot option and code which supports it.  Anyone needing
to do an unclean shutdown can just do a 'echo c > /proc/sysrq-trigger'.

Modify adb so that it calls into init to perform a shutdown.

Bug: 8646621
Change-Id: I84c0513acb549720cb0e8c9fcbda0050f5c396f5
2013-04-23 13:21:40 -07:00
Jamie Gennis
dcbe6b4b17 am b7b2c71b: am 25538257: Merge "cutils: add a way to disable tracing for a process" into jb-mr2-dev
* commit 'b7b2c71bf8bf685af4c716e78d5c70decab98b54':
  cutils: add a way to disable tracing for a process
2013-04-16 15:21:50 -07:00
Jamie Gennis
2553825797 Merge "cutils: add a way to disable tracing for a process" into jb-mr2-dev 2013-04-16 22:12:47 +00:00
Jamie Gennis
b13ea45a04 cutils: add a way to disable tracing for a process
This change adds the atrace_set_tracing_enabled call to libcutils.  The call
can be used to disable all tracing (of the atrace variety) for the current
process.  This is to be used to disable tracing in the Zygote process, as there
is no way for Zygote to be notified of changes to the enabled trace tags.

Change-Id: I0b691cc0dcfc65b16e3d17e1db2866a4deb253a7
2013-04-15 18:50:22 -07:00
Ken Sumrall
cb1300a255 am 3b051178: am 774814d1: Merge "klog: Have klog_write() call klog_init() if needed" into jb-mr2-dev
* commit '3b0511788c86968860a682b6652c26c4415fa222':
  klog: Have klog_write() call klog_init() if needed
2013-04-15 10:38:50 -07:00
Ken Sumrall
774814d194 Merge "klog: Have klog_write() call klog_init() if needed" into jb-mr2-dev 2013-04-15 17:33:27 +00:00