summaryrefslogtreecommitdiffstats
path: root/include/cutils
Commit message (Collapse)AuthorAgeFilesLines
* Use fsck.f2fs -a instead of -f for faster bootYusuke Sato2016-05-051-0/+5
| | | | | | | | | | | | | | | | | | and run fsck with -f on clean shutdown instead. With -f, fsck.f2fs always performs a full scan of the /data partition regardless of whether the partition is clean or not. The full scan takes more than 2 seconds on volantis-userdebug and delays the OS boot. With -a, the command does almost nothing when the partition is clean and finishes within 20-30ms on volantis-userdebug. When the partition has an error or its check point has CP_FSCK_FLAG (aka "need_fsck"), the command does exactly the same full scan as -f to fix it. Bug: 21853106 Change-Id: I126263caf34c0f5bb8f5e6794454d4e72526ce38
* cutils: Add support for ioprio cgroupSteve Kondik2015-10-121-0/+2
| | | | Change-Id: I335816304573149c1d96c5e6ea804a49e7695996
* add cpuset support to libcutilsTim Murray2015-06-111-0/+2
| | | | | | bug 21782794 Change-Id: I249531754fb29442dc3c7434d77dbb103f4220a7
* Fix gettid() on Windows.Dan Albert2015-05-131-7/+10
| | | | | | | | | | Accidentally had this all hidden by an #ifndef _WIN32 when I wrote it. Bug: 19517541 (cherry picked from commit b3a36ca5ee79411c18984b85b224d9285b4468af) Change-Id: Ifbd5d19e506e7313700e2e29a2dae5736e049844
* Remove dead code.Elliott Hughes2015-04-211-26/+0
| | | | | | We weren't even building this. Change-Id: I8b2afbc76d784a7b24bbe0be6502b9fbcf0b5c09
* Remove a declaration for an unimplemented function.Elliott Hughes2015-04-201-1/+0
| | | | Change-Id: I890cef52e9a8c26d98f227f269a7dcfcb6eaa795
* Merge "Revert "cutils: add OS-independent endian.h""Greg Hackmann2015-04-161-52/+0
|\
| * Revert "cutils: add OS-independent endian.h"Greg Hackmann2015-04-161-52/+0
| | | | | | | | This reverts commit c3bac8b6719332f31140b2a034b70cf7f9eb3e51.
* | Merge "cutils: add OS-independent endian.h"Greg Hackmann2015-04-161-0/+52
|\ \ | |/
| * cutils: add OS-independent endian.hGreg Hackmann2015-04-161-0/+52
| | | | | | | | | | | | | | | | | | cutils/endian.h provides the helpers defined in endian(3), either by pulling in the OS's built-in endian.h (where available) or recreating them using GCC builtins. Change-Id: Ic8965f67e1efdc03f884dbe6b7fe0276f840e4fc Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | Move trace.h to stdatomic.Yabin Cui2015-04-161-3/+3
|/ | | | | Bug: 20262261 Change-Id: Idaf984786804eb76c285f38b11abbbc0d3706509
* Just use snprintf for android_get_control_socket.Elliott Hughes2015-04-021-19/+9
| | | | Change-Id: I3d0da03847f79c9f9b2cfd7189a07f63b17fc4a2
* Be more intention-revealing with libcutils' strlcpy.Elliott Hughes2015-04-021-1/+1
| | | | | | | Several people have been independently confused about when this gets built and why over the past couple of days. Change-Id: I2d4a02f66e24c0734327585b7d27e50a344b1e94
* Move all libcutils tests into the gtests.Elliott Hughes2015-04-021-0/+5
| | | | | | | | | | | This also fixes the bug where we were always testing against the fake strlcpy we provide for glibc/Windows rather than the Android one. This also removes some unnecessary library dependencies. This also builds all the cutils tests for the host (static and dynamic). Change-Id: Icd129d5b025c0ca801be5acf31a54ecd88608df9
* Merge "Define atrace_* functions for both target and host."Richard Uhler2015-04-011-14/+0
|\
| * Define atrace_* functions for both target and host.Richard Uhler2015-03-271-14/+0
| | | | | | | | | | | | | | 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
* | Log more timing information from init.Elliott Hughes2015-03-281-1/+3
|/ | | | | | | | | | | | | | | | | 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
* Fix mac sdk build.Christopher Ferris2015-03-231-0/+1
| | | | | | Add include files for types and functions that were not included properly. Change-Id: I4849f5bdf535c6eec9254228cf980c30d11a5a1b
* Move gettid() into libcutils.Dan Albert2015-03-231-2/+2
| | | | Change-Id: Ic8a15036833e6d129b7998d954b804be391de399
* android_reboot should take a const char*.Elliott Hughes2015-02-031-1/+1
| | | | | | The kernel argument is actually a void*, but it's only read from. Change-Id: I305c50249bf12b7fbdea4721257aed52a0372f8d
* Kill HAVE_PTHREADS.Yabin Cui2015-01-271-12/+10
| | | | | Bug: 19083585 Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
* Move 32 bit/64 bit check into debuggerd.Christopher Ferris2015-01-201-27/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove unused cruft from libcutils.Elliott Hughes2015-01-151-34/+0
| | | | Change-Id: I316d39e8e0a9aa385d8e1f37678b8bf2c03441eb
* Merge "Extend to receive NFLOG packets."Jeff Sharkey2015-01-161-0/+1
|\
| * Extend to receive NFLOG packets.Jeff Sharkey2015-01-151-0/+1
| | | | | | | | | | | | | | | | | | 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
* | Add timed versions of stack dumping functions.Christopher Ferris2015-01-151-0/+15
|/ | | | | | | | | | | | | 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 5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38) Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
* Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER.Elliott Hughes2015-01-121-16/+0
| | | | Change-Id: I3d92dbecebd2bb449a8c4332de684919a58847ad
* You either have winsock or <sys/sockets.h>.Elliott Hughes2015-01-091-1/+1
| | | | | | There is no third choice. Change-Id: I8f1206f22798f747896dd53f3081cdfa4b1707c4
* Remove atomic-inline.h.Elliott Hughes2014-11-173-21/+2
| | | | Change-Id: I3ac0229b9c516744e6a9c9d9e795b43bc9c5636b
* Remove the error-prone TARGET_CPU_SMP from system/core.Elliott Hughes2014-11-172-8/+0
| | | | | | | | 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
* Second attempt to "Rewrite atomic.h to use stdatomic.h."Hans Boehm2014-11-138-1039/+112
| | | | | | | | | | | | This should not be committed until win_sdk and aarch64 builds are fixed in the presence of this CL. This reverts commit 2789faabfa9cdf16902a52a1de3fc4a7ae98efed. We additionally remove uniprocessor support from the earlier CL, thus avoiding a potential compiler code reordering issue. Change-Id: I7207a5ca2efa907a6f757f172d7090a62b2311fe
* am 07f1300c: am 7979f1ce: Merge "Do not inline rarely used trace function ↵Chih-Hung Hsieh2014-10-151-39/+11
|\ | | | | | | | | | | | | bodies." * commit '07f1300c4c4f7d3c0df540bf8df3443c3f4539cd': Do not inline rarely used trace function bodies.
| * Do not inline rarely used trace function bodies.Chih-Hung Hsieh2014-10-141-39/+11
| | | | | | | | | | | | | | | | When atrace_* functions are inlined, the rarely used 1024-byte buffers are allocated on stack. BUG: 17444504 Change-Id: I773512aeb70e8b79f3803c6d59cba064d2aa65b6
* | am 072877af: am 41198eea: Merge "Revert "Rewrite atomic.h to use stdatomic.h.""Hans Boehm2014-10-048-124/+1039
|\ \ | |/ | | | | | | * commit '072877af485d49f11e227c0d22a7bb4a341533d6': Revert "Rewrite atomic.h to use stdatomic.h."
| * Revert "Rewrite atomic.h to use stdatomic.h."Hans Boehm2014-10-048-124/+1039
| | | | | | | | | | | | This reverts commit cb344d464009337c283431dec4441b70481d1a49. Change-Id: Ib17cd8d00695062177ce863cedc4ec7148012317
* | am f5204549: am 028928fe: Merge "Rewrite atomic.h to use stdatomic.h."Hans Boehm2014-10-048-1039/+124
|\ \ | |/ | | | | | | * commit 'f5204549faf7310cc808bcb3676fb36268178e26': Rewrite atomic.h to use stdatomic.h.
| * Rewrite atomic.h to use stdatomic.h.Hans Boehm2014-10-018-1039/+124
| | | | | | | | | | | | | | Replace atomic-inl.h with a file that just includes atomic.h. Remove platform specific implementations. Change-Id: If16d74fbe0af7836ed8c1296c17e13a2d0d20f64
| * Use the correct debuggerd given the tid.Christopher Ferris2014-09-131-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 a9fa7b87f1aefd7b96f749a545d3385ad384c12b) Change-Id: I3c9e0212c8720877a6af092071a3695df2a36df8
* | am 07dda6b5: Merge "Use the correct debuggerd given the tid." into lmp-devChristopher Ferris2014-09-131-3/+16
|\ \ | | | | | | | | | | | | * commit '07dda6b57c6a476177b68ad42966f24cbbdb04c1': Use the correct debuggerd given the tid.
| * | Use the correct debuggerd given the tid.Christopher Ferris2014-09-121-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Remove android_... store_barriers and 64-bit atomics.Hans Boehm2014-09-028-262/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are no longer used, and we want to strongly discourage future use. Keep the 32-bit variants while there are still uses. All users should move to C11 or C++11 atomics. (Resolved conflicts in atomic-...64.h with uniprocessor support removal as in AOSP.) Bug:16880454 Change-Id: I122b541cfd29ef4a6c932647f85d0d6a9d802061 (cherry picked from commit 9959ed953069ac9a7f08bebd2df55440e9370c0f)
* | | am 424eaece: am 69001e08: Merge "Remove android_... store_barriers and ↵Hans Boehm2014-08-278-225/+0
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 64-bit atomics." * commit '424eaece64e3649082a3972a8eebf76a6b403494': Remove android_... store_barriers and 64-bit atomics.
| * | Remove android_... store_barriers and 64-bit atomics.Hans Boehm2014-08-278-225/+0
| | | | | | | | | | | | | | | | | | | | | | | | These are no longer used, and we want to strongly discourage future use. Keep the 32-bit variants while there are still uses. All users should move to C11 or C++11 atomics. Change-Id: I122b541cfd29ef4a6c932647f85d0d6a9d802061
* | | am 4592d73e: am a59b6ac6: Merge "Only the Mac doesn\'t have open_memstream."Elliott Hughes2014-08-211-2/+2
|\ \ \ | |/ / | | | | | | | | | * commit '4592d73e18684b8ba2addb97433eed4cf389e386': Only the Mac doesn't have open_memstream.
| * | Merge "Only the Mac doesn't have open_memstream."Elliott Hughes2014-08-211-2/+2
| |\ \
| | * | Only the Mac doesn't have open_memstream.Elliott Hughes2014-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should probably move this into art, since they're the only people using it. Bug: 17164505 Change-Id: I67b8f0cbad4c6368d4424e6979d6b044dd36aa37
* | | | am f7e88e51: am 373c7758: Merge "There\'s no non-SMP LP64."Elliott Hughes2014-08-203-37/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | * commit 'f7e88e51b31e64e085b3a564f4b1baa8334d63f1': There's no non-SMP LP64.
| * | There's no non-SMP LP64.Elliott Hughes2014-08-203-37/+0
| |/ | | | | | | | | Bug: 17108682 Change-Id: I7e44ab48b5cacf989333882ffe67f39e9b0ce843
| * Remove <cutils/tztime.h>.Elliott Hughes2014-07-241-24/+0
| | | | | | | | Change-Id: I043c6686361bda9e85b82408511bf241a42b9229
| * Do not typedef char16_t if it is a keyword.Hans Boehm2014-07-161-1/+4
| | | | | | | | | | | | | | Don't define char16_t on platforms where char16_t is a keyword, as C11 and C++11 define it to be. Change-Id: I6717bc2133c1363ecd85861f3869e1eabd2ce96a