summaryrefslogtreecommitdiffstats
path: root/libcutils
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Config utils improvement"Eric Laurent2011-05-271-0/+12
|\
| * Config utils improvementEric Laurent2011-05-261-0/+12
| | | | | | | | | | | | Added a function to free resources allocated by config node tree. Change-Id: I2ee8ae642899ec4501fa6e490c5be7efaa2d738e
* | Tracking merge of dalvik-dev to masterjeffhao2011-05-272-0/+45
| | | | | | | | | | | | | | | | | | | | Reordered bootclasspath to allow verification of all framework methods. git cherry-pick --no-commit ec164a0170955fe63106c2576a65bc4ffb1df425 Address CVE-2011-1090. git cherry-pick --no-commit 3365288d3c00072689cd9d733e055561cadc87b5 Change-Id: I6a89bc600ced06a0cb84ae1670cb7a6ea39de9c8
* | Merge "Crypto changes for devices that don't write ext4 fs on wipe"Ken Sumrall2011-05-262-1/+68
|\ \ | |/ |/|
| * Crypto changes for devices that don't write ext4 fs on wipeKen Sumrall2011-05-262-1/+68
| | | | | | | | | | | | | | This adds a new function to libcutils, partition_wiped(). This is used to determine if a partition is wiped. Change-Id: Ibb388976c6b5bd3923b62d8f79b2b97748abf6c1
* | rename uevent_checked_recv to uevent_kernel_multicast_recvNick Kralevich2011-05-111-1/+1
|/ | | | Change-Id: I1839627490080efcbb7269699709064856312f8b
* libcutils: build str_parms test for target instead of hostDima Zavin2011-04-271-2/+2
| | | | | Change-Id: Ic1cd1c26b86b051c25db2521bd90b58731e29135 Signed-off-by: Dima Zavin <dima@android.com>
* Merge "libcutils: add a simple string parameter parsing ("a=b;c=d;") helper ↵Dima Zavin2011-04-272-1/+339
|\ | | | | | | utils"
| * libcutils: add a simple string parameter parsing ("a=b;c=d;") helper utilsDima Zavin2011-04-202-1/+339
| | | | | | | | | | Change-Id: Ifabeb75550fa6e351434e6e6d036b19331daf6c1 Signed-off-by: Dima Zavin <dima@android.com>
* | Merge "libcutils: hashmap: save next pointer in forEach before calling callback"Dima Zavin2011-04-271-1/+2
|\ \ | |/
| * libcutils: hashmap: save next pointer in forEach before calling callbackDima Zavin2011-04-191-1/+2
| | | | | | | | | | | | | | | | If the callback passed to forEach tries to remove the element it was passed, there's a use-after-free of the entry pointer in forEach. Change-Id: Ia364b4775c9c55780b23f683b30cbff511b7f944 Signed-off-by: Dima Zavin <dima@android.com>
| * Merge "Fix a race in system properties."Brad Fitzpatrick2011-03-141-39/+1
| |\
| | * Fix a race in system properties.Brad Fitzpatrick2011-03-101-39/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This now passes: $ adb shell am instrument -w -e class android.os.SystemPropertiesTest \ com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner (which tests setting and re-reading back system properties in a loop) This patch depends on I110b653a which moves property setting from libcutils into bionic. Bug: 3511230 Change-Id: Iee1ca9b7defd6060510a01f40fbe63ba4c96eb8d
* | | resolved conflicts for merge of 2baeb898 to honeycomb-plus-aospNick Kralevich2011-04-272-1/+71
|\ \ \ | | | | | | | | | | | | Change-Id: Ib3169b3a36aa13ef413da624355b1737e9b76fd9
| * | | Fold uevent message origin checking from init into libcutils.Vernon Tang2011-04-282-1/+71
| | | | | | | | | | | | | | | | Change-Id: I7cbc0cb840d1b4962e6c360fdad9a9c0ce20e87b
* | | | am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message origin checking ↵Nick Kralevich2011-04-272-71/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | from init into libcutils."" * commit '03752be0a437d12e19ac73ebe23385fe6f756e2c': Revert "Fold uevent message origin checking from init into libcutils."
| * | | Revert "Fold uevent message origin checking from init into libcutils."Nick Kralevich2011-04-272-71/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8405ec0e7562a370174d9973dd94984c47e49c36. The original change does not compile.
* | | | am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin checking from ↵Nick Kralevich2011-04-272-0/+71
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | init into libcutils." * commit 'a7cf7ed93486240ca48a407e67c7c3683a3b93aa': Fold uevent message origin checking from init into libcutils.
| * | | Fold uevent message origin checking from init into libcutils.Vernon Tang2011-04-272-0/+71
| | | | | | | | | | | | | | | | Change-Id: I1a38e611a7ad990f74306ce453740a1eeed2416d
| * | | Assembly coded android_memset16 and android_memset32Bruce Beare2011-01-028-1/+1334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifa05006df7ce7364d18eb10d64a818d619664475 Author: Lu, Hongjiu <hongjiu.lu@intel.com> Signed-off-by: Mark Gross <mark.gross@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | | do not merge. Fix a race in system properties.satok2011-03-151-39/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport Iee1ca9b7defd6 This now passes: $ adb shell am instrument -w -e class android.os.SystemPropertiesTest \ com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner (which tests setting and re-reading back system properties in a loop) This patch depends on I110b653a which moves property setting from libcutils into bionic. Bug: 3511230 Change-Id: I145e642bd13079677017bb64e361e176fc73b810
* | | Try to unmount writable filesystems when rebootingKen Sumrall2011-03-102-1/+135
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Ext4 filesystems like to be unmounted before rebooting. The Android system doesn't have a traditional Linux init setup, and shutting down the system was not much more than calling sync(2) and reboot(2). This adds a new function to libcutils called android_reboot(). By default, it calls sync() and then remounts all writable filesystems as read-only and marks them clean. There is a flag parameter in which the caller can ask for sync() not to be called, or to not remount the filesystems as read-only. Then it will call reboot(2) as directed by the other parameters. This change also updates adb, init and toolbox to call the new android_reboot() function. Fixes bugs 3350709 and 3495575. Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
* | Remove unconditional swap from the android atomic operations suite.Carl Shapiro2011-01-231-12/+0
| | | | | | | | | | Bug: 3381237 Change-Id: I7bdc7c8eb4c1cc6303d96e40ca2f196a007c4dd2
* | Assembly coded android_memset16 and android_memset32Lu, Hongjiu2011-01-078-1/+1334
|/ | | | Change-Id: Ife2dd406e1dcb962e5e97788c515ac96f5c52e44
* Qualify the source argument of atomic loads as a const pointer.Carl Shapiro2010-09-281-2/+2
| | | | | | Also normalizes the opening brace placment in a few locations. Change-Id: I8f518e933094337d5d3371321326ffc03b3a5f5a
* Including dl heap stubs for the dalvikvm host buildJesse Wilson2010-08-181-1/+1
| | | | Change-Id: I9d0ce98d433f71db25c58bf464ec9317552cfae6
* Tracking merge of dalvik-dev to gingerbreadBrian Carlstrom2010-08-041-0/+12
| | | | | | | | git cherry-pick --no-commit b99a099c git cherry-pick --no-commit 9811671e023ceb82029040f7acf599013c773e6b git cherry-pick --no-commit d0645bf0cc76ef7be11cf77a8e1995233a1972e4 Change-Id: Ie70fecaeaba97a25f114cd2717e381b5107533b1
* Define inline atomic operations for x86 and ARM.Carl Shapiro2010-06-233-766/+4
| | | | | | | | This change moves the ARM definitions into GCC extended inline assembler. In addition, the same set of x86 definitions are now shared among all x86 targets. Change-Id: I6e5aa3a413d0af2acbe5d32994983d35a01fdcb3
* Atomic/SMP update, part 2.Andy McFadden2010-05-274-325/+479
| | | | | | | | | | | | | | | | Added new atomic functions, renamed some old ones. Some #defines have been added for backward compatibility. Merged the pre- and post-ARMv6 implementations into a single file. Renamed the semi-private __android_membar_full_smp to USE_SCREAMING_CAPS since that's more appropriate for a macro. Added lots of comments. Note Mac OS X primitives have not been tested. Change-Id: If827260750aeb61ad5c2b760e30658e29dbb26f2
* Atomic/SMP update.Andy McFadden2010-05-204-222/+46
| | | | | | | | | | | | | | | | | | | | | | | Added atomic-inline.h. Added a platform-specific memory barrier call there. Added android_atomic_acquire_cmpxchg() and android_atomic_release_store(). Not tested on Mac OS X or SH. Added memory barrier calls to linux-x86 atomics. Mac OS X has barrier functions already. sh isn't really SMP-ready. linux-arm needs work (to be done in a separate change). Updated the makefile to make the SMP state visible to the code here. Note that host binaries are NOT built with SMP enabled; while our hosts are very likely SMP, it's not worth figuring out e.g. whether it's okay to use the SSE2 mfence instruction or have to use something else. We haven't had barriers enabled in host tools before, so there's probably no need to stat now. Removed quasiatomic 64-bit calls (now part of Dalvik). Change-Id: I49e5e6c8abe70f304cdedb9d7b8e6e65f8925815
* fix windows SDK buildBrad Fitzpatrick2010-05-081-1/+3
| | | | Change-Id: I2c563b20197803cafa91214aeff2c06fc0c75580
* More fixes to Binder perf regression from EclairBrad Fitzpatrick2010-05-071-32/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-use the file descriptor to change the cgroups. There's a fast path in the kernel for the case where the value's already uncahnged. Also, this is okay because the kernel ignores the write offset. This is essentially a ioctl-ish/datagram interface, despite being a fd we're writing to. This reduces Dalvik->Dalvik void/void Binder calls on Sapphire from ~1.2 to ~0.8 ms. This is a bit slower than the ~0.7 ms we get avoiding the write altogether. strace confirms: [pid 1557] ioctl(21, 0xc0186201 <unfinished ...> [pid 1556] <... ioctl resumed> , 0x45399cd0) = 0 [pid 1556] write(22, "1556", 4) = 4 [pid 1556] ioctl(21, 0xc0186201 <unfinished ...> [pid 1555] <... ioctl resumed> , 0x45299cd0) = 0 [pid 1555] write(22, "1555", 4) = 4 [pid 1555] ioctl(21, 0xc0186201 <unfinished ...> [pid 1554] <... ioctl resumed> , 0x45199cd0) = 0 [pid 1554] write(22, "1554", 4) = 4 BUG=2660235 Change-Id: Ia9f9e1d5b792eaebc9560f89931faf6df0cf9c0d
* Optimize set_sched_policy(), which gets called in every binder call.Brad Fitzpatrick2010-05-061-16/+22
| | | | | | | | | | | - use static /dev/cpuctl filenames, rather than sprintf() on the fly - use a custom formatter instead of sprintf() for the tid number This is a simplified version of Dan's original Ifc9c81f74fe65f0695ead53b30194bc6adf00da0 to be less risky for Froyo. Bug: 2660235 Change-Id: I744bbc2ec01fd2569612c814a497df40a933b622
* system/core: Switch libsysutils & sched_policy LOG -> SLOGSan Mehat2010-03-251-7/+7
| | | | | Change-Id: Id74c6895a8012c5915f2e259339101844de7c085 Signed-off-by: San Mehat <san@google.com>
* cutils: sched_policy: Make getSchedulerGroup() play nicely with multiple ↵San Mehat2010-03-021-20/+44
| | | | | | control groups Signed-off-by: San Mehat <san@google.com>
* cutils: schedpolicy: remove stray includeSan Mehat2010-02-261-1/+0
| | | | Signed-off-by: San Mehat <san@google.com>
* cutils: iosched_policy: Don't do anything for simulatorSan Mehat2010-02-261-0/+7
| | | | Signed-off-by: San Mehat <san@google.com>
* system: Add support for getting/setting i/o priorities and include a ↵San Mehat2010-02-252-1/+63
| | | | | | userspace tool Signed-off-by: San Mehat <san@google.com>
* Merge "Break out create_contiguous_mspace_with_base This routine allows ↵Barry Hayes2010-02-081-40/+67
|\ | | | | | | creating a contiguous mspace from raw mapped memory. In turn, this will enable preallocation of the 3 heap spaces, which will help remembered sets and zygote/app checks given pointer values."
| * Break out create_contiguous_mspace_with_baseBarry Hayes2010-01-261-40/+67
| | | | | | | | | | | | This routine allows creating a contiguous mspace from raw mapped memory. In turn, this will enable preallocation of the 3 heap spaces, which will help remembered sets and zygote/app checks given pointer values.
* | Try to fix Mac build.Andy McFadden2010-01-261-0/+2
| | | | | | | | | | Throwing in an include of <unistd.h> and <sys/types.h> to get off_t defined. Might work.
* | Implementation of open_memstream().Andy McFadden2010-01-252-0/+380
|/ | | | | | | | | | | POSIX seems to have chosen open_memstream() over the BSD variant. We want something for Dalvik that will work on both GNU/Linux and Android, so this is open_memstream() implemented in terms of BSD funopen(). For Windows there's just a stub that calls abort(). I'm putting this in libcutils since it seems inappropriate for bionic (which provides the BSD alternatives) but isn't Dalvik-specific.
* Fix bogus pointer math.Barry Hayes2009-12-101-1/+2
|
* am f95837a1: am cf9f442e: am c1c38dd0: system: sched_policy: Don\'t return ↵San Mehat2009-12-041-1/+10
|\ | | | | | | | | | | | | | | | | an error when the thread we\'re trying to move exits on us Merge commit 'f95837a1e13c9b63bfe0b0f95f00ec0d72ba2e74' * commit 'f95837a1e13c9b63bfe0b0f95f00ec0d72ba2e74': system: sched_policy: Don't return an error when the thread we're trying to move exits on us
| * am cf9f442e: am c1c38dd0: system: sched_policy: Don\'t return an error when ↵San Mehat2009-12-031-1/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | the thread we\'re trying to move exits on us Merge commit 'cf9f442ef336d4fb6300318a3137b23a4697e048' into eclair-mr2-plus-aosp * commit 'cf9f442ef336d4fb6300318a3137b23a4697e048': system: sched_policy: Don't return an error when the thread we're trying to move exits on us
| | * system: sched_policy: Don't return an error when the thread we're trying to ↵San Mehat2009-12-031-1/+10
| | | | | | | | | | | | | | | | | | move exits on us Signed-off-by: San Mehat <san@google.com>
* | | Add missing symbol type directives.Doug Kwan2009-12-032-0/+16
| | |
* | | am 9fdf607c: am b63747d4: am f6eba8fa: cutils: make set_process_name set ↵Erik Gilling2009-11-051-1/+14
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | kernel thread name as well Merge commit '9fdf607c20f9610e442baa87cac5479c98f9d200' * commit '9fdf607c20f9610e442baa87cac5479c98f9d200': cutils: make set_process_name set kernel thread name as well
| * | am b63747d4: am f6eba8fa: cutils: make set_process_name set kernel thread ↵Erik Gilling2009-11-051-1/+14
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | name as well Merge commit 'b63747d4d9d2e26c90a5310c996210e722159d04' into eclair-mr2-plus-aosp * commit 'b63747d4d9d2e26c90a5310c996210e722159d04': cutils: make set_process_name set kernel thread name as well
| | * cutils: make set_process_name set kernel thread name as wellErik Gilling2009-11-051-1/+14
| | | | | | | | | | | | Signed-off-by: Erik Gilling <konkers@android.com>