summaryrefslogtreecommitdiffstats
path: root/libcutils
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | | am 525fb03e: am 58e50f80: am 805d67ab: cutils: sched_policy: Fix bug where ↵San Mehat2009-10-291-3/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | we were unable to move backgrounded threads into the foreground Merge commit '525fb03e18f9b08651e3d8abb262d70c3482b405' * commit '525fb03e18f9b08651e3d8abb262d70c3482b405': cutils: sched_policy: Fix bug where we were unable to move backgrounded threads into the foreground
| * | am 58e50f80: am 805d67ab: cutils: sched_policy: Fix bug where we were unable ↵San Mehat2009-10-291-3/+5
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | to move backgrounded threads into the foreground Merge commit '58e50f80307577268ecb6b86aa97236e008a9aa0' into eclair-mr2-plus-aosp * commit '58e50f80307577268ecb6b86aa97236e008a9aa0': cutils: sched_policy: Fix bug where we were unable to move backgrounded threads into the foreground
| | * cutils: sched_policy: Fix bug where we were unable to move backgrounded ↵San Mehat2009-10-291-3/+5
| | | | | | | | | | | | | | | | | | threads into the foreground Signed-off-by: San Mehat <san@google.com>
* | | am 748cb49e: am cc43ee42: am d2e4e46c: cutils: schedpolicy: Add debug code ↵San Mehat2009-10-291-0/+37
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | to log sched policy transitions Merge commit '748cb49e0049e0f504137a4930ec8502affbb03a' * commit '748cb49e0049e0f504137a4930ec8502affbb03a': cutils: schedpolicy: Add debug code to log sched policy transitions
| * | am cc43ee42: am d2e4e46c: cutils: schedpolicy: Add debug code to log sched ↵San Mehat2009-10-291-0/+37
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | policy transitions Merge commit 'cc43ee42acc3df89f584c670c4287e25808f23b2' into eclair-mr2-plus-aosp * commit 'cc43ee42acc3df89f584c670c4287e25808f23b2': cutils: schedpolicy: Add debug code to log sched policy transitions
| | * cutils: schedpolicy: Add debug code to log sched policy transitionsSan Mehat2009-10-291-0/+37
| | | | | | | | | | | | Signed-off-by: San Mehat <san@google.com>
* | | am 38b2ddc4: am 17bfbd3c: am c0dfca7a: cutils: Add support for reading a ↵San Mehat2009-10-281-3/+88
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | processes scheduler policy Merge commit '38b2ddc4a7cf1c47397af118a6d466d45f59da04' * commit '38b2ddc4a7cf1c47397af118a6d466d45f59da04': cutils: Add support for reading a processes scheduler policy
| * | am 17bfbd3c: am c0dfca7a: cutils: Add support for reading a processes ↵San Mehat2009-10-281-3/+88
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | scheduler policy Merge commit '17bfbd3ccbb798aa4068cd59150ce712660a62a4' into eclair-mr2-plus-aosp * commit '17bfbd3ccbb798aa4068cd59150ce712660a62a4': cutils: Add support for reading a processes scheduler policy
| | * cutils: Add support for reading a processes scheduler policySan Mehat2009-10-271-3/+88
| | | | | | | | | | | | Signed-off-by: San Mehat <san@google.com>
| | * Add stack unwinding directives to atomic-android-arm.S.Ben Cheng2009-10-211-0/+18
| | | | | | | | | | | | | | | | | | For bug 2182296. Eclair branch Dr. No approved by: hiroshi
* | | am 62f39c10: merge from open-source masterJean-Baptiste Queru2009-10-143-0/+167
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '62f39c105af8789fd9308fa6a5b91f0963a7c59b' * commit '62f39c105af8789fd9308fa6a5b91f0963a7c59b': adb: Add "adb disconnect" command for disconnecting TCP/IP devices. Add support for Acer devices adb: Add USB Vendor IDs for LG and Huawei Add NOTICE file and license tag for adb adb: Clean up argument passing for create_service_thread() Revert "adb: Another attempted workaround for the adb disconnect problem." libsysutils: Fix some bugs in NetlinkListener and NetlinkEvent added SuperH atomic support to libcutils
| * | merge from open-source masterJean-Baptiste Queru2009-10-143-0/+167
| |\ \
| | * \ merge from open-source masterJean-Baptiste Queru2009-10-143-0/+167
| | |\ \
| | | * \ Merge change 10445Android Code Review2009-09-173-0/+167
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * changes: added SuperH atomic support to libcutils
| | | | * | added SuperH atomic support to libcutilsShin-ichiro KAWASAKI2009-08-043-0/+167
| | | | | |
* | | | | | am 22f9d880: am 8a0a5274: Add stack unwinding directives to ↵Ben Cheng2009-10-131-0/+18
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | atomic-android-arm.S. Merge commit '22f9d880941cf1db87fd19437bce71420eedf8bd' * commit '22f9d880941cf1db87fd19437bce71420eedf8bd': Add stack unwinding directives to atomic-android-arm.S.
| * | | | | am 8a0a5274: Add stack unwinding directives to atomic-android-arm.S.Ben Cheng2009-10-131-0/+18
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '8a0a5274ff37cbf3acad0199735a05e5fe3b5c9d' into eclair-mr2-plus-aosp * commit '8a0a5274ff37cbf3acad0199735a05e5fe3b5c9d': Add stack unwinding directives to atomic-android-arm.S.
| | * | | | Add stack unwinding directives to atomic-android-arm.S.Ben Cheng2009-10-121-0/+18
| | | |_|/ | | |/| |
* | | | | Now all the callers are gone, remove adb_networking.*.Elliott Hughes2009-10-022-173/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | (This is the final patch removing adb networking.) Bug: 1122968
* | | | am 05647c89: Merge change 25170 into eclairRaphael2009-09-171-0/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Merge commit '05647c89ef330c8d3fbc3504ecb5f29db89c84fd' into eclair-plus-aosp * commit '05647c89ef330c8d3fbc3504ecb5f29db89c84fd': Disable sched_policy under Windows.
| * | | Disable sched_policy under Windows.Raphael2009-09-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new HAVE_SCHED_H arch define, which is used to prevent from building sched_policy.c during the Windows SDK. Change-Id: I3667857a4ae7d6baaf1efd1cd187a5baf91419d8
* | | | merge from open-source masterJean-Baptiste Queru2009-09-151-5/+11
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | ARM architecture reference manuals for ARMv6 & ARMv7 state that the use of ↵Vinay HARUGOP2009-09-101-5/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | 'swp' instruction is deprecated ARMv6 onwards. These architectures provide the load-linked, store-conditional pair of ldrex/strex whose use is recommended in place of 'swp'. Also, the description of the 'swp' instruction in the ARMv6 reference manual states that the swap operation does not include any memory barrier guarantees.This fix attempts to address these issues by providing an atomic swap implementation using ldrex/strex under _ARM_HAVE_LDREX_STREX macro. _ARM_HAVE_LDREX_STREX macro is defined in cpu-features.h file and patch is submitted under change ID 11088. This Fix is verified on ST Ericsson's U8500 platform and Submitted on behalf of a third-party: Surinder-pal SINGH from STMicroelectronics.
| * Merge korg/donut into korg/masterJean-Baptiste Queru2009-07-256-511/+97
| |\
| * | Fix bug where ECONNABORTED would have always occured on asocket_write.Nick Pelly2009-05-291-1/+1
| | | | | | | | | | | | Use POLLOUT for writes. Duh.