summaryrefslogtreecommitdiffstats
path: root/libcutils
Commit message (Collapse)AuthorAgeFilesLines
* fs_config: replace getenv('OUT') by new fs_config parameterThierry Strudel2015-07-091-6/+13
| | | | | | | | | | | | | | Using a getenv('OUT') in such a deep down function is a wrong design choice. Replacing with explicit parameter that may be NULL in case device specific files can be accessed from /. Since TARGET_COPY_OUT_SYSTEM may be defined to something different than system we also ensure that we use a path relative to TARGET_OUT to compute path to fs_config_* files. Bug: 21989305 Bug: 22048934 Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b Signed-off-by: Thierry Strudel <tstrudel@google.com>
* Merge "Fix janky navbar ripples -- incorrect timerslack values" into mnc-devTodd Kjos2015-06-291-1/+3
|\
| * Fix janky navbar ripples -- incorrect timerslack valuesTodd Kjos2015-06-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a thread is created while the parent thread is "Background", then the default timerslack value gets set to the current timerslack value of the parent (40ms). The default value is used when transitioning to "Foreground" -- so the effect is that the timerslack value becomes 40ms regardless of foreground/background. This does occur intermittently for systemui when creating its render thread (pretty often on hammerhead and has been seen on shamu). If this occurs, then some systemui animations like navbar ripples can wait for up to 40ms to draw a frame when they intended to wait 3ms -- jank. This fix is to explicitly set the foreground timerslack to 50us. A consequence of setting timerslack behind the process' back is that any custom values for timerslack get lost whenever the thread has transition between fg/bg. See Bug: 19398120 Change-Id: Idc259717f62fa2255f8bafbbf88b68c0043f29cf
* | Don't set cgroup policy when updating cpusets.Tim Murray2015-06-221-4/+1
|/ | | | | | bug 21782794 Change-Id: I3b2cf8ae4f3ed0c14f206584ae7fa2b1a1d11ad0
* add cpuset support to libcutilsTim Murray2015-06-112-31/+92
| | | | | | bug 21782794 Change-Id: I249531754fb29442dc3c7434d77dbb103f4220a7
* Don't use TEMP_FAILURE_RETRY on close in system/core.Elliott Hughes2015-05-271-3/+3
| | | | | | Bug: http://b/20501816 Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50 (cherry picked from commit 47b0134ec2b5e8c8b5b5671cd4a3e41261275532)
* klog: don't unconditionally call mknod()Nick Kralevich2015-05-191-0/+5
| | | | | | | | | | | | If /dev/kmsg already exists, it's unnecessary for klog_init() to create it's own copy. This avoids needing to grant the mknod permission to everyone who uses kmsg. Typically the only time /dev/kmsg doesn't exist is before ueventd starts. (cherrypicked from commit 4d32a486fe62ef2c1440167604654a2f4e023fbd) Bug: 21242418 Change-Id: I0c88d80feca6899fcdbc8c9f2f99448ee0a3422d
* Prevent integer overflow when allocating native_handle_tAdam Lesinski2015-05-151-2/+8
| | | | | | | | | User specified values of numInts and numFds can overflow and cause malloc to allocate less than we expect, causing heap corruption in subsequent operations on the allocation. Bug: 19334482 Change-Id: I43c75f536ea4c08f14ca12ca6288660fd2d1ec55
* Remove libbacktrace definition of gettid.Dan Albert2015-05-131-6/+1
| | | | | | | | | | | Also simplifies the Darwin implementation of gettid, because apparently libbacktrace had a better way of doing it. Bug: 19517541 (cherry picked from commit 23f750b068ddf5b20fb5d153a798b22562368992) Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
* Fix gettid() on Windows.Dan Albert2015-05-131-21/+21
| | | | | | | | | | 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-335/+0
| | | | | | We weren't even building this. Change-Id: I8b2afbc76d784a7b24bbe0be6502b9fbcf0b5c09
* Merge "[MIPS] Fast android_memset for Mips64, Mipsr6"Elliott Hughes2015-04-173-325/+96
|\
| * [MIPS] Fast android_memset for Mips64, Mipsr6Duane Sand2015-04-163-325/+96
| | | | | | | | | | | | | | | | | | | | Fix broken mips64 build by replacing mips32r2-only android_memset.S. Use HW-bonded pairs of 64-bit stores to fill 128 bits/cycle. Rely on HW automatic cache prefetch optimizations. Software cache prefetching is counterproductive on next mips cores. New method is coded in C, and also works okay on non-Mips architectures. Change-Id: Id7153a8fe11538fe25287e101375661b0e99e2a2
* | Merge "Revert "cutils: add OS-independent endian.h""Greg Hackmann2015-04-162-61/+0
|\ \
| * | Revert "cutils: add OS-independent endian.h"Greg Hackmann2015-04-162-61/+0
| | | | | | | | | | | | This reverts commit c3bac8b6719332f31140b2a034b70cf7f9eb3e51.
* | | Merge "cutils: add OS-independent endian.h"Greg Hackmann2015-04-162-0/+61
|\ \ \ | |/ /
| * | cutils: add OS-independent endian.hGreg Hackmann2015-04-162-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge "Move trace.h to stdatomic."Yabin Cui2015-04-162-8/+8
|\ \ \ | |/ / |/| |
| * | Move trace.h to stdatomic.Yabin Cui2015-04-162-8/+8
| | | | | | | | | | | | | | | Bug: 20262261 Change-Id: Idaf984786804eb76c285f38b11abbbc0d3706509
* | | libcutils: fs_config must use O_BINARYMark Salyzyn2015-04-161-2/+6
| | | | | | | | | | | | | | | Bug: 19908228 Change-Id: I3273cf99b320941f9530a015c9e582af72469acb
* | | libcutils: fs_config: winsdk_tools build fixMark Salyzyn2015-04-161-1/+1
| |/ |/| | | | | | | Bug: 19908228 Change-Id: Ia725d20ca4f8a87deec63b6c661f6a09c8671231
* | libcutils: drop use of mmapMark Salyzyn2015-04-151-45/+30
| | | | | | | | | | | | | | - Causes a build break for MAC and Windows Bug: 19908228 Change-Id: I9d69967aa988c9ca202805593fa846cb670101cf
* | libcutils: add fs_config_generateMark Salyzyn2015-04-151-0/+21
| | | | | | | | | | Bug: 19908228 Change-Id: Icb0e189a86758bb779b9bdf7c0d92216d297869f
* | libcutils: fs_config read from fileMark Salyzyn2015-04-151-12/+141
| | | | | | | | | | | | | | | | | | | | Intention is to read from ${OUT}/system/etc/fs_config_dirs and ${OUT}/system/etc/fs_config_files on host. And /system/etc/fs_config_dirs and /system/etc/config_files on target systems. Bug: 19908228 Change-Id: Ieaedd99e88c7f7f717878d9344c387ddf335ccbb
* | Revert "libcutils: fs_config read from file"Mark Salyzyn2015-04-151-125/+12
|/ | | | | | | | There is no endian.h on windows This reverts commit 4e5f71ae727c5993db05d0024da026bf68eabc59. Change-Id: I6aedf35ed319c7f8febc7ab98e104a625fb27f69
* libcutils: fs_config read from fileMark Salyzyn2015-04-151-12/+125
| | | | | | | | | | Intention is to read from ${OUT}/system/etc/fs_config_dirs and ${OUT}/system/etc/fs_config_files on host. And /system/etc/fs_config_dirs and /system/etc/config_files on target systems. Bug: 19908228 Change-Id: I0966a94f79a3fae4f7325056c701ea355370f9df
* android_filesystem_config: move fs_config to libcutilsMark Salyzyn2015-04-061-11/+0
| | | | | Bug: 19908228 Change-Id: Id51c0c50eb2677824d052882f4263193a08e1402
* libcutils: add fs_configMark Salyzyn2015-04-062-0/+146
| | | | | Bug: 19908228 Change-Id: I78e6a8d780e578a287ffdee7b7120ecc74797e80
* Fix Windows strlcpy.c build.Elliott Hughes2015-04-021-2/+1
| | | | Change-Id: I572c553227a5a2cd57ec304de7e898d7c801fe93
* Be more intention-revealing with libcutils' strlcpy.Elliott Hughes2015-04-022-20/+8
| | | | | | | 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-025-90/+96
| | | | | | | | | | | 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
* Move mips/mips64 android_memset16/android_memset32 into libcutils.Elliott Hughes2015-04-024-73/+327
| | | | Change-Id: Ia826dd872f64cc80635f50525a0c393f43ae5204
* Fix shared version of libcutils on the host to include strlcpyBrian Carlstrom2015-04-021-1/+1
| | | | Change-Id: Ic727508d9cfadea0050d1ccc491ee61aac1ef55a
* Revert "Disable the static libcutils tests."Dan Albert2015-04-011-17/+15
| | | | | | | | | | Also move them to libc++ since stlport is dead. Bug: 18389856 This reverts commit bb28776db0f5a107ef2b90ff1322f4c06b6cc7de. Change-Id: Icdf9be3bc5cc40433727ff71a121b145002dda72
* Merge "Define atrace_* functions for both target and host."Richard Uhler2015-04-013-2/+38
|\
| * Define atrace_* functions for both target and host.Richard Uhler2015-03-273-2/+38
| | | | | | | | | | | | | | 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
* | Always unlink /dev/__kmsg__.Elliott Hughes2015-03-281-4/+1
| | | | | | | | | | | | Whether the open succeeds or fails, we should unlink. Change-Id: Ic2f1e10dc7b6d6e459c56049da00d165bd63ba8f
* | Log more timing information from init.Elliott Hughes2015-03-281-22/+21
|/ | | | | | | | | | | | | | | | | 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
* Merge "Add make target for shared libcutils on host."Richard Uhler2015-03-251-1/+11
|\
| * Add make target for shared libcutils on host.Richard Uhler2015-03-241-1/+11
| | | | | | | | | | | | Needed by host dex2oat. Change-Id: Ia5b53136de3d531c820f03c3f251e58418204be1
* | Fix mac sdk build.Christopher Ferris2015-03-231-0/+2
| | | | | | | | | | | | Add include files for types and functions that were not included properly. Change-Id: I4849f5bdf535c6eec9254228cf980c30d11a5a1b
* | More Mac fix.Dan Albert2015-03-231-0/+1
| | | | | | | | Change-Id: I7a1f726819c68eea1afb7e45f92954325f8933e1
* | Undo mac fix to fix windows, fix mac differently.Dan Albert2015-03-232-3/+5
| | | | | | | | Change-Id: I7d1ee439d25e17c31c0be448e67a90a0f626ff42
* | (Probably) fix the mac build.Dan Albert2015-03-231-1/+1
| | | | | | | | Change-Id: I4209f2d66d8701df2f32dcfb79abea9ea6d3dc69
* | Move gettid() into libcutils.Dan Albert2015-03-231-1/+30
|/ | | | Change-Id: Ic8a15036833e6d129b7998d954b804be391de399
* am 6864e673: Merge "More SOCK_CLOEXEC"Nick Kralevich2015-02-271-1/+1
|\ | | | | | | | | * commit '6864e6739027adf725ced33777d3e21f80a95479': More SOCK_CLOEXEC
| * More SOCK_CLOEXECNick Kralevich2015-02-261-1/+1
| | | | | | | | Change-Id: I3e18f34d08a6443aaf55d7c91c27867840ac1773
* | am f1ac6917: Merge "Remove loghack.h."Narayan Kamath2015-02-212-121/+1
|\ \ | |/ | | | | | | * commit 'f1ac6917da172dd3e6829bac41fcbf23e96da079': Remove loghack.h.
| * Remove loghack.h.Narayan Kamath2015-02-212-121/+1
| | | | | | | | | | | | | | 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
* | am 623eebe6: Merge "Libcutils: Remove unused variable"Andreas Gampe2015-02-201-1/+0
|\ \ | |/ | | | | | | * commit '623eebe68f3c6c9e54cf5b186696052d2948410c': Libcutils: Remove unused variable