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
This change does not affect existing behavior at all and makes
the file compatible with new toolchain.
Change-Id: Ia33bb9372d1705ec538b414bf69773f093e4543c
init now creates files in /dev/bus/usb/ for user access to USB devices.
Files are chmod 660 with group AID_USB.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Supports access to Linux usbdevfs on both device and Linux host.
Change-Id: Ie88a5193be3ee715792b10b34b3da32ffc4ca57b
Signed-off-by: Mike Lockwood <lockwood@android.com>
init now creates files in /dev/bus/usb/ for user access to USB devices.
Files are chmod 660 with group AID_USB.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Typical usage is 'run-as <package-name> <command>' to run <command>
in the data directory, and the user id, of <package-name> if, and only
if <package-name> is the name of an installed and debuggable application.
This relies on the /data/system/packages.list file generated by the
PackageManager service.
BEWARE: This is intended to be available on production devices !
On devices that use a pppd for cellular network access, a pppd-ril
process needs to run as root to configure the connection. Changing
the process to suid-root in the build image is the only known way
to avoid needing to remount the system image at boot to accomplish
the same thing.
Change-Id: I6c778391b8040ee818343e304891e7d341cc729b
value of sbrk(0) in UNIX. In terms of dlmalloc and our proprietary
contiguous mspace class, this is the highest address returned by its
morecore method.
source of the aforementioned build breakage was then errant include of
this header when stddef.h was intended. Nothing in this file uses any
of the symbols exported from stdint.h, only symbols from stddef.h.
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.
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.
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.
Detect byte endianness when compiled in x86-64 mode in Mac OS X 10.6
Snow Leopard environments or above. Allows compilation of host binaries
in these environments without any changes from its default stock
configuration.
This change doesn't require that the binaries be built in 64-bit, but it
does allow this. One could still use "gcc_select 4.0" with the 10.4 SDK
installed on Snow Leopard to compile in 32-bit mode.
Change-Id: I155a531a9bff450dd6c077b5275652731c59a908
Merge commit '31b5d4b98e8079a1d97aff8dc3e0824b95d1e294'
* commit '31b5d4b98e8079a1d97aff8dc3e0824b95d1e294':
NDK header for accessing pixels of a java bitmap
Merge commit '45e5ca1c7047b20d36bd31b30b7d2a4786baab0f' into eclair-mr2-plus-aosp
* commit '45e5ca1c7047b20d36bd31b30b7d2a4786baab0f':
NDK header for accessing pixels of a java bitmap
Platforms differ on whether sys/sendfile.h or sys/socket.h is where to
find the declaration for sendfile().
Change-Id: Ib6e882534b7dc605d30aefed55732dc1ee2b6772
Platforms differ on whether sys/sendfile.h or sys/socket.h is where to
find the declaration for sendfile().
Change-Id: Ib6e882534b7dc605d30aefed55732dc1ee2b6772
Merge commit '38b2ddc4a7cf1c47397af118a6d466d45f59da04'
* commit '38b2ddc4a7cf1c47397af118a6d466d45f59da04':
cutils: Add support for reading a processes scheduler policy
Merge commit '17bfbd3ccbb798aa4068cd59150ce712660a62a4' into eclair-mr2-plus-aosp
* commit '17bfbd3ccbb798aa4068cd59150ce712660a62a4':
cutils: Add support for reading a processes scheduler policy
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
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
This optimized implementation of the SHA1 algorithm is about 28%
faster than the old one (on sapphire hardware) but assumes
little-endianness. Add it, but continue using the old implementation
on big-endian hardware.
This adds HAVE_STDINT_H and HAVE_STDBOOL_H to the configuration. We've
been using HAVE_STDINT_H for a while but just never bothered to define
it, and we're about to start using HAVE_STDBOOL_H.
I enabled them for the linux and darwin targets, and left it undefined
for freebsd/windows.
nexus: Change field separator from : to ' '
Signed-off-by: San Mehat <san@google.com>
nexus: Add some prototypes for stuff to come
Signed-off-by: San Mehat <san@google.com>
nexus: Add some TODOs
Signed-off-by: San Mehat <san@google.com>
libsysutils: Put a proper token parser into the FrameworkListener which
supports minimal \ escapes and quotes
Signed-off-by: San Mehat <san@google.com>
nexus: Fix a lot of bugs
Signed-off-by: San Mehat <san@google.com>
libsysutils: Remove some debugging
Signed-off-by: San Mehat <san@google.com>
nexus: Send broadcasts for supplicant state changes
Signed-off-by: San Mehat <san@google.com>
nexus: Plumb DHCP listener state changes to NetworkManager
Signed-off-by: San Mehat <san@google.com>
nexus: Make the SupplicantState strings more parsable
Signed-off-by: San Mehat <san@google.com>
nexus: Broadcast a message when dhcp state changes.
Signed-off-by: San Mehat <san@google.com>
nexus: Add a few new response codes
Signed-off-by: San Mehat <san@google.com>
nexus: Rename ErrorCode -> ResponseCode
Signed-off-by: San Mehat <san@google.com>
nexus: Add DHCP event broadcasting. Also adds the framework for
tracking supplicant 'searching-for-AP' state
Signed-off-by: San Mehat <san@google.com>
nexus: REmove WifiScanner
Signed-off-by: San Mehat <san@google.com>
nexus: Change the way scanning works. scanmode can now be selected
independantly of triggering a scan. Also adds rxfilter support
Signed-off-by: San Mehat <san@google.com>
nexus: Add support for configuring bluetooth coexistence scanning and modes
Signed-off-by: San Mehat <san@google.com>
nexus: use case insensitive match for property names
Signed-off-by: San Mehat <san@google.com>
nexus: Rollup of a bunch of stuff:
- 'list' command now takes an argument to match against
- InterfaceConfig has been moved into the Controller base (for now)
- DhcpClient now has some rudimentry locking
- process 'ADDRINFO' messages from dhcpcd
- Drop tertiary dns
Signed-off-by: San Mehat <san@google.com>
nexus: Clean up some of the supplicant variable parsing and add 'wifi.current'
Signed-off-by: San Mehat <san@google.com>
nexus: Add driver-stop/start, initial suspend support
Signed-off-by: San Mehat <san@google.com>
nexus: Add Controller suspend/resume callbacks, as well as locking
Signed-off-by: San Mehat <san@google.com>
nexus: Make ARP probing configurable for DhcpClient
Signed-off-by: San Mehat <san@google.com>
nexus: Add linkspeed / rssi retrieval
Signed-off-by: San Mehat <san@google.com>
nexus: Add WifiStatusPoller to track RSSI/linkspeed when associated
Signed-off-by: San Mehat <san@google.com>
nexus: Disable some debugging and add 'wifi.netcount' property
Signed-off-by: San Mehat <san@google.com>
nexus: Replace the hackish property system with something more flexible with namespaces
Signed-off-by: San Mehat <san@google.com>
libsysutils: Fix a few bugs in SocketListener
Signed-off-by: San Mehat <san@google.com>
nexus: PropertyManager: Add array support
Signed-off-by: San Mehat <san@google.com>
nexus: Clean up properties
Signed-off-by: San Mehat <san@google.com>
nexus: WifiController: Change name of 'CurrentNetwork' property
Signed-off-by: San Mehat <san@google.com>
Merge commit '2d0a6ca27c6f75eb0ec881fe4ad0b4f478d941c0'
* commit '2d0a6ca27c6f75eb0ec881fe4ad0b4f478d941c0':
nexctl: Refactor so Nexus can be tested from scripts easily.
libsysutils: Move to a null terminated string protocol using space as a field separator.
Merge commit '1f75d709c10f49d2e2390b888e766bcfd17da860'
* commit '1f75d709c10f49d2e2390b888e766bcfd17da860':
Add VPN and Keystore services and data directories.
-- changed the default mode to 0770 for keystore with the new user 'keystore'.
-- add the keystore service providing the basic key lookup/install/remove, but
only keystore user can access the key content.
This is needed by the MemoryFile changes in
https://android-git.corp.google.com/g/2714
where it is used to find out whether a file descriptor
refers to an ashmem region.
asocket_connect()
asocket_accept()
asocket_read()
asocket_write()
These calls are similar to the regular syscalls, but can be aborted with:
asocket_abort()
Calling close() on a regular POSIX socket does not abort blocked syscalls on
that socket in other threads.
After calling asocket_abort() the socket cannot be reused.
Call asocket_destory() *after* all threads have finished with the socket to
finish closing the socket and free the asocket structure.
The helper is implemented by setting the socket non-blocking to initiate
syscalls connect(), accept(), read(), write(), then using a blocking poll()
on both the primary socket and a local pipe. This makes the poll() abortable
by writing a byte to the local pipe in asocket_abort().
asocket_create() sets the fd to non-blocking mode. It must not be changed to
blocking mode.
Using asocket will triple the number of file descriptors required per
socket, due to the local pipe. It may be possible to use a global pipe per
process rather than per socket, but we have not been able to come up with a
race-free implementation yet.
All functions except asocket_init() and asocket_destroy() are thread safe.
Merge commit 'ebefc48e61a7d5cf2a3228e6c8729feeeb42d1b4'
* commit 'ebefc48e61a7d5cf2a3228e6c8729feeeb42d1b4':
Expose the stable/frozen log-related definitions of <cutils/logd.h> into a new header: <android/log.h>
Document internal CodeGenerator interface
Move license to a separate license file.
Define a public API for calling libacc.
Update the "acc" test program to use the public API.
Move "main.cpp" and test scripts into the tests subdirectory.
Move test data from tests to tests/data
Remove stale test data.
Merge commit 'fee77ec093f78c1bb0ce85aa16d7ee8e8fa06f8a'
* commit 'fee77ec093f78c1bb0ce85aa16d7ee8e8fa06f8a':
don't use cdefs.h as it breaks the windows build.
asocket_connect()
asocket_accept()
asocket_read()
asocket_write()
These calls are similar to the regular syscalls, but can be aborted with:
asocket_abort()
Calling close() on a regular POSIX socket does not abort blocked syscalls on
that socket in other threads.
After calling asocket_abort() the socket cannot be reused.
Call asocket_destory() *after* all threads have finished with the socket to
finish closing the socket and free the asocket structure.
The helper is implemented by setting the socket non-blocking to initiate
syscalls connect(), accept(), read(), write(), then using a blocking poll()
on both the primary socket and a local pipe. This makes the poll() abortable
by writing a byte to the local pipe in asocket_abort().
asocket_create() sets the fd to non-blocking mode. It must not be changed to
blocking mode.
Using asocket will triple the number of file descriptors required per
socket, due to the local pipe. It may be possible to use a global pipe per
process rather than per socket, but we have not been able to come up with a
race-free implementation yet.
All functions except asocket_init() and asocket_destroy() are thread safe.
Merge commit '414ff7d98ac8d7610a26206335954ad15f43f3ac'
* commit '414ff7d98ac8d7610a26206335954ad15f43f3ac':
Move fdevent from libcutils into adb directory. ADB is the only client of this API, and I intend to modify it extensively to clean its codebase soon.
Merge commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4'
* commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4':
Add support for "standalone months" to tztime's strftime().
The idea here is that some languages need a different form of the month
name in constructions like "January 2" than in "January 2009", since the
one in the "January 2" case really means "of January." So with this change,
a format string of "%-B" will use the standalone month, while "%B" will
continue to use the format month.
Merge commit 'c73d9e43a0c98a87222ef0c8749d6abba06c7778'
* commit 'c73d9e43a0c98a87222ef0c8749d6abba06c7778':
libsysutils: Add multiple client support and fix some bugs
nexus: Implement wifi scanner and fix a lot of bugs
Merge commit '747baadddb37737b0ecf83f6147a5e3252a34b12'
* commit '747baadddb37737b0ecf83f6147a5e3252a34b12':
libsysutils: New C++ system convenience library
This library contains re-usable classes for common
system level daemons. Initial consumers of this library
are 'nexus' and 'vold2'
Signed-off-by: San Mehat <san@google.com>