Commit graph

103 commits

Author SHA1 Message Date
Elliott Hughes
e9ca709a73 Remove the error-prone TARGET_CPU_SMP from system/core.
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
2014-11-17 11:16:59 -08:00
Chih-Hung Hsieh
60c57dad4e Add -no-integrated-as at local level.
Later we will enable integrated-as as default at the global level.

BUG: 17820427
Change-Id: I1beed3e75d074d970fa9112ec1c0f0df3d43947a
2014-10-06 13:33:25 -07:00
Varvara Rainchik
458d1253f5 Clean up memset[16,32] routines: unify files names, remove redundant wrapper
for 32-bit, remove Atom caches sizes for 64-bit, fix license.

Change-Id: Ieda6367d7b21cf25b2beda6dd8d77cf668d3f2af
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-09-17 18:11:18 +04:00
Dan Albert
949aa23898 Fix some clang compilation issues.
Use expected inline behavior with clang.

GCC defaults to -std=gnu90, giving C89 inline semantics with GNU
extensions. Clang defaults to C99. Explicitly use gnu90.

Mark an unused parameter as __unused.

Fix some incorrect casts.

Change-Id: I05b95585d5e3688eda71769b63b6b8a9237bcaf4
2014-09-11 17:17:32 +00:00
Duane Sand
734f50c2fe [MIPSR6] Skip pixelflinger, memset assembler code on mips32r6
Temporarily use generic C-coded libpixelflinger & memset on mips32r6.

Change-Id: I629b11ba955eaba323cba1df96c39f75f4d24d62
2014-07-31 16:21:16 -07:00
Stephen Hines
03cc1f747c Remove invalid 64-bit host objects.
Bug: 16408818

These targets are no longer in use, since we have a proper way to create both
32-bit and 64-bit host libraries in a single build now.

Change-Id: Icd09f795acd220de5b5e956a8d8e1b4ab4864fa9
2014-07-22 13:36:16 -07:00
Christopher Ferris
d660d895c1 Add android_memset16/android_memset32 for aarch64.
Included new unit tests for these functions.

Bug: 15456369

Change-Id: I3fac02f61c62d15d54d0df51957680d7155e98ae
2014-06-23 19:28:33 -07:00
Henrik Smiding
86a1600fb6 Port libcutils memset16/32 to x86_64.
Port libcutils memset16/32 assembly SSE2 optimizations to x86_64
architecture. Ensures the same performance on 64-bit arch.

Change-Id: I874a71a884c0d28a152933ddff9cb886c9a6e99e
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
2014-06-05 18:51:44 -07:00
Ian Rogers
59ec765382 Host multilib build of both 32-bit and 64-bit libraries.
Change-Id: I54f91f385b109fc664a1a1f9320affb2a846fef1
2014-06-05 15:26:22 -07:00
Mathieu Chartier
e942d1f9ea Fix build.
Change-Id: I7b0cf6a248c74f1a06e0b5d51a5be13124ced6a0
2014-06-03 18:12:29 -07:00
Mathieu Chartier
0b9674f241 Fix build.
Change-Id: I6bafe6221e1ce7e4b04269df90996ab08b050e93
2014-06-03 15:32:10 -07:00
Elliott Hughes
0bff5bd952 Fix win32 undefined reference to `_socket_network_client_timeout'.
Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
2014-05-20 12:13:29 -07:00
Ying Wang
9f437d7181 Remove unused LOCAL_LDLIBS.
Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
2014-05-07 15:36:05 -07:00
Mark Salyzyn
02a7c3a7c3 libcutils: win_sdk build issues
Change-Id: Ic431166f686aebfd0ee00ad3224b95237ff7a0de
2014-05-05 10:29:56 -07:00
Mark Salyzyn
12717169a5 libcutils: turn on -Werror
- Deal with some -Wunused / -Wunused-variable issues

Change-Id: I28c23fb213382a392ec30935749fb359e072d664
2014-05-01 17:58:17 -07:00
Jens Gulin
d3c8d5b8d4 Handle errno properly to avoid corrupt str_parms
A normal sequence of calls is as follows:
str_parms_create_str, str_parms_add_str, str_parms_destroy.
In some cases the destroy caused double free.

str_parms_add_str will clone the input and send it to hashmapPut
for storage. If hashmapPut did not store the strings it will raise
errno = ENOMEM and leave caller with ownership of the strings.
In any of these cases it will be safe to destroy the str_parms.

But what if it wasn't hashmapPut that said NOMEM? What if there
was a stale NOMEM already before a successful hashmapPut?
In that case the strings will be successfully added to the list
(if new), but when str_parms_add_str sees the NOMEM it will free
them anyway, leaving dangling pointers in the str_parms!!

It is the responsibility of the caller to clear errno before any
interesting call. This patch makes sure that str_parms_add_str
reacts only on errno emmitted from hashmapPut.

Change-Id: If87e4bcc482f09e1c66133d33517b152ebdac65f
2014-04-03 11:19:54 -07: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
65dd88becc system/core: remove $(KERNEL_HEADERS) from includes
The kernel headers are already in the include path, and manually
adding them again will break on a multiarch build, where the
kernel headers may be different for each arch.

Change-Id: Ib13d96543f2c97b1b487a46e1748ceb2c5724169
2014-01-22 19:06:04 -08:00
Elliott Hughes
6891df7a65 am 45ddf184: am 9b8a929d: Merge "libcutils doesn\'t need to be looking at bionic\'s privates."
* commit '45ddf184960225862c6e178588034cce676683e3':
  libcutils doesn't need to be looking at bionic's privates.
2013-10-10 10:40:11 -07:00
Elliott Hughes
7f7b12b8eb am 5baecee3: am be18538d: Merge "Cleanup x86 flags and memset versions"
* commit '5baecee3c6bf348b77b8785bcd8e35362a3507fb':
  Cleanup x86 flags and memset versions
2013-10-10 10:40:10 -07:00
Elliott Hughes
478c566a90 libcutils doesn't need to be looking at bionic's privates.
Change-Id: Ib11a0c1bdc4b85c58274b21a07aa92f958d23713
2013-10-10 09:50:56 -07:00
Pavel Chupin
4aa51cd468 Cleanup x86 flags and memset versions
ARCH_X86_HAVE_SSE2 is always true

Change-Id: I680493d14280aafad5448aec727e8d9a84a6db00
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-10 20:20:16 +04:00
Ying Wang
f47c01da18 am 1690a5a6: am aa62be65: Merge "Use SSE2 enhanced memset for capable x86 processors"
* commit '1690a5a6943d4e4b65d5e4dcd077702c2c8f40a0':
  Use SSE2 enhanced memset for capable x86 processors
2013-09-26 10:56:52 -07:00
Daniel Leung
51546ee32c Use SSE2 enhanced memset for capable x86 processors
Originally, if TARGET_ARCH_VARIANT is x86-atom, the SSE2 enhanced
memset is used. This patch extends this to all x86 processors which
support SSE2 (i.e. ARCH_X86_HAVE_SSE2 is true).

Indentation added to the ifeq cases to make this easier to read.

Change-Id: I05f49e237a95359d3f2e3216b037e3fc1a0fbcb0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-24 12:53:18 -07:00
Jeff Sharkey
0ee7d8c68b Fix Mac builds, for realz.
Change-Id: I63e21b90e5b8a8f016dd04ceca4354793faa5e37
2013-09-20 18:00:15 -07:00
Jeff Sharkey
4481c325b1 Fix Mac builds.
Change-Id: I0eb029395a3afd2f93a7632d7d3d20d28c2ab189
2013-09-20 17:35:15 -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
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
b39e3a8a4f libcutils: Don't build host property support
Only build property support for the device, not for the
host. Host side property support is being removed, as it
was only really used for the simulator.

process_name.c: When building this for the host, don't
reference properties.

Change-Id: Idcea5ad52a85e47eef17a381cb0601657efbdf13
2013-05-23 11:04:54 -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
Ying Wang
821620f593 am c796ed97: We need libcutils to include liblog
* commit 'c796ed97466510dd5239008554decbe72825e19c':
  We need libcutils to include liblog
2013-04-11 15:57:35 -07:00
Ying Wang
c796ed9746 We need libcutils to include liblog
For some prebuilts were built against libcutils with liblog in it.
Unfortunately that means in the future if someone checks in prebuilts
that are built against libcutils and they don't explicitly link against
liblog, they will again prevent us from removing liblog from libcutils.

Bug: 8587800
Bug: 8580410
Change-Id: I2a5ed6233df7e7d542d1e4167bec405750c0e671
2013-04-10 17:33:48 -07:00
Keun-young Park
9c37960cd9 am 9b32f87a: Merge "Add Mips memset speedup"
* commit '9b32f87a8c489a15baea535800b7c309014bd0ee':
  Add Mips memset speedup
2013-03-29 16:09:10 -07:00
Keun-young Park
9b32f87a8c Merge "Add Mips memset speedup" 2013-03-29 21:05:23 +00:00
Jeffrey Brown
c5c410fe3d am 4b9bdd33: am 90dd1402: am 241194ca: Merge "[MIPS] Benchmark test for MIPS memset16/memset32"
# By Duane Sand
# Via Android Git Automerger (2) and others
* commit '4b9bdd333362c1f58260c37306f1902fb215f7bf':
  [MIPS] Benchmark test for MIPS memset16/memset32
2013-02-06 20:59:56 -08:00
Jeffrey Brown
241194cad4 Merge "[MIPS] Benchmark test for MIPS memset16/memset32" 2013-02-07 04:40:05 +00:00
Elliott Hughes
def8d6a706 The localtime_tz and mktime_tz extensions are now in bionic.
(cherry-pick of d03072ffde. This change
was originally committed to AOSP, is in internal master, but was somehow
lost from AOSP.)

Bug: 7012465

Conflicts:

	libcutils/Android.mk

Change-Id: I08ee8eb9b8ce5d3f9d8f2e67437d653e08697bc1
2013-01-15 11:34:08 -08:00
Duane Sand
d4a80984fc [MIPS] Benchmark test for MIPS memset16/memset32
Author: Chris Dearman <chris@mips.com>
AuthorDate: 2011-07-26 19:24:40
Change-Id: I0a7b3360aaf45de8ee47744f7031b84f15f37611
2012-12-27 12:38:51 -08:00
Alex Ray
0a34643160 cutils: Add tracing support
Basic tracing functionality to cutils, which can be turned on at start,
or dynamically controlled by the frameworks.  The goal is for hardware
modules to add tracing that will be controlled by their respective
services.

Change-Id: I84eeb7d6be0038f734e719074fa4a2fae4ffe9c0
2012-11-28 13:56:15 -08:00
Elliott Hughes
663005248d The localtime_tz and mktime_tz extensions are now in bionic.
Bug: 7012465

(cherry-pick of d03072ffde3279fbb60591a0d07c820d8e792762.)

Conflicts:

	libcutils/Android.mk

Change-Id: I5e34edd4c8f59cc0a4d5dcc4740707ae063608a0
2012-10-18 11:38:23 -07:00
Jeff Sharkey
9685194fc9 File-system utilities for installd and zygote.
Bug: 7008879
Change-Id: Ia54b8d4ad434e8973f235e2a4728651814bef8a9
2012-08-30 10:29:41 -07:00
Duane Sand
1ca120588a Add Mips memset speedup
Change-Id: I157aa8b500e271c213bf615dd4ceb25b3aedd7c2
2012-08-29 12:33:50 -07:00
Ian Rogers
fd7f1b6a50 Revert "Revert "Upgrade to dlmalloc 2.8.5.""
This reverts commit 42b83c6df7.
2012-08-28 15:52:20 -07:00
Brian Carlstrom
42b83c6df7 Revert "Upgrade to dlmalloc 2.8.5."
This reverts commit 2d13791ce7.
2012-08-22 12:10:19 -07:00
Brian Carlstrom
1768707951 am e05ac541: am 9d779bf1: Merge "Upgrade to dlmalloc 2.8.5."
* commit 'e05ac5415e861dee6a3f175c8066ff577736ba1f':
  Upgrade to dlmalloc 2.8.5.
2012-08-20 17:04:24 -07:00
Ian Rogers
2d13791ce7 Upgrade to dlmalloc 2.8.5.
Remove mspace functionality from cutils.
Directly declare mspace from dlmalloc in code flinger's code cache, and
manage without using morecore.

Depends upon: https://android-review.googlesource.com/41717

Change-Id: If927254febd4414212c690f16509ef2ee1b44b44
2012-08-20 15:30:35 -07:00
Jeff Sharkey
de980f27a7 Omit multiuser.c from Windows builds.
Change-Id: I0cee35373e33084e4fc65a1d5c0b611c6fa82346
2012-08-16 17:16:43 -07:00
Jeff Sharkey
2be5338a84 Merge "Multi-user external storage support." into jb-mr1-dev 2012-08-16 14:33:00 -07:00
Jeff Sharkey
885342a0f2 Multi-user external storage support.
Remount rootfs as recursively shared, so that mount changes are
propagated into child namespaces.  Mount external storage for access
from adb.

Clean multi-user dependencies for use in Dalvik.  Also define
external storage paths.

Bug: 6925012
Change-Id: I375de581a63f4f36667894c56a34a9dd45361e8f
2012-08-15 21:10:07 -07:00
Jean-Baptiste Queru
93be76f5c0 am e8e73b01: am 311a4758: Merge "Remove system/core\'s remnants of SH support."
* commit 'e8e73b01399e8d3c3fc6b94d26ef9cc49b33dda8':
  Remove system/core's remnants of SH support.
2012-08-13 16:03:30 -07:00