Commit graph

2336 commits

Author SHA1 Message Date
Andy McFadden
ac322da69e Atomic/SMP update.
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
2010-05-20 21:40:33 -07:00
Dima Zavin
2bdcf63c4c Merge "Don't define __linux__ if it is already defined by the toolchain. This change does not affect existing behavior at all and makes the file compatible with new toolchain." 2010-05-20 00:31:18 -07:00
Jing Yu
165db2a198 Don't define __linux__ if it is already defined by the toolchain.
This change does not affect existing behavior at all and makes
the file compatible with new toolchain.

Change-Id: Ia33bb9372d1705ec538b414bf69773f093e4543c
2010-05-18 10:55:52 -07:00
The Android Open Source Project
e95aad61d8 merge from open-source master
Change-Id: I414c9479f4f913c777ef18b7ff27e410f49d35b9
2010-05-17 08:54:31 -07:00
Mike Lockwood
93ac1559b8 init: Add support for /dev/bus/usb/ file system and add new unix group AID_USB.
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>
2010-05-16 16:04:51 -04:00
Mike Lockwood
5e567cb34b libusbhost: add usb_endpoint_get_device()
Change-Id: Ibe4ce0551faca5d2d8bec0fbd21315a393b9f208
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-12 08:53:49 -04:00
Mike Lockwood
30ff2c70ce libusbhost: new library for Linux USB host support.
Supports access to Linux usbdevfs on both device and Linux host.

Change-Id: Ie88a5193be3ee715792b10b34b3da32ffc4ca57b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-10 11:37:26 -04:00
Mike Lockwood
b717dc85d8 init: Add support for /dev/bus/usb/ file system and add new unix group AID_USB.
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>
2010-05-06 13:40:51 -04:00
Brian Carlstrom
7a5c359054 Merge commit 'b419c35c660d7421e18a9efef38eca11966b44c7' into mm 2010-05-02 10:32:42 -07:00
Raphael
b419c35c66 Fix adb, fastboot to compile in Windows SDK under Linux.
(Merged from master Change I3d0e4cab)

Change-Id: Ib3fd566bdaf09d5893a6b0c66168c76c6b0d92eb
2010-04-23 13:07:17 -07:00
Raphael
fab167850d Fix adb, fastboot to compile in Windows SDK under Linux.
Change-Id: I3d0e4cabd65d9de17036901a22ec3277a6d58e64
2010-04-13 15:28:26 -07:00
Brian Carlstrom
a68049a8cc Merge remote branch 'goog/froyo' into mm 2010-04-06 15:31:23 -07:00
Eric Olsen
3555019d78 Add Bluetooth SCO connection blacklist
Change-Id: Ieb11debfea66ec715f48e8069619c2c15acf2035
Signed-off-by: Eric Olsen <eolsen@android.com>
2010-03-18 10:26:59 -07:00
David 'Digit' Turner
1f4d95296a Add 'run-as' command implementation as set-uid program.
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 !
2010-03-17 11:02:08 -07:00
Wink Saville
bbf1c64527 Change permissions on pppd-ril
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
2010-03-11 16:22:44 -08:00
San Mehat
a6391f1006 system: libdiskconfig: Add libdiskconfig
Change-Id: Ie7a7b5d8016dec60cdfb17228c3f519789c98564
Signed-off-by: San Mehat <san@google.com>
2010-03-10 15:19:06 -08:00
Dmitry Shmidt
1159d7f800 sysutils: Increase number of command arguments to 16
Change-Id: I0bba579634b334d24645c2af55ab3fab6da03fc6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-03-09 10:46:29 -08:00
Nick Kralevich
3e1aac6c4d Change netcfg permissions to 2750.
Fix bug 2104034.

Change-Id: I30bcc41f33623cadc63693fd54206ccbb1886a5a
2010-03-08 11:36:10 -08:00
Joe Onorato
e2bf2ea4d2 Make logcat print both the main and system buffers by default. Make SLOGx macros work. 2010-03-01 13:03:19 -08:00
San Mehat
1bfb4803ea Merge "system: Add support for getting/setting i/o priorities and include a userspace tool" 2010-02-26 10:03:26 -08:00
Jaikumar Ganesh
eafdd86f4d Update bluetooth data files path. 2010-02-25 19:46:29 -08:00
San Mehat
10d469bff9 system: Add support for getting/setting i/o priorities and include a userspace tool
Signed-off-by: San Mehat <san@google.com>
2010-02-25 14:02:55 -08:00
Mathias Agopian
fa36f2c3b7 fix [2448319] out of bounds array index in fog 2010-02-16 21:01:12 -08:00
Mathias Agopian
5dca849345 remove unused YUV constants 2010-02-16 16:54:53 -08:00
Dima Zavin
8e4f143d45 pixelflinger: add defines for nv12_tiled semi-planar and nv21 semi-planar
Change-Id: Ib56c19f3c5a71730dd7a7a82b10a59c2bb9b5de8
Signed-off-by: Dima Zavin <dima@android.com>
2010-02-16 15:14:26 -08:00
Carl Shapiro
b99a099cad Add a new method to export the extent of the break, akin to return
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.
2010-02-16 14:37:43 -08:00
Carl Shapiro
63b396d89c Eliminate the stdint.h include. In retrospect, it seems that the
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.
2010-02-12 15:53:31 -08:00
Carl Shapiro
143b370748 Include stddef.h to make the size_t visible. Resolves a simulator
build break caused by a use of ashmem.h in an environment without
size_t.
2010-02-12 12:45:28 -08:00
Barry Hayes
17128f6e43 Break out create_contiguous_mspace_with_base
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.
2010-02-09 10:23:25 -08:00
Barry Hayes
2dcf1fb9ff Merge "Break out create_contiguous_mspace_with_base 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." 2010-02-08 20:46:41 -08:00
Dima Zavin
157bf769be Remove libjnigraphics. moved to frameworks/base/native
Change-Id: Ieb65ab1428198a82e583059f75661808f350ea2b
Signed-off-by: Dima Zavin <dima@android.com>
2010-02-04 15:32:07 -08:00
Jean-Baptiste Queru
4544a9f7b4 resolved conflicts for merge of c8472186 to master
Change-Id: I41acaaa3a5d6aeb6873472f17db4cfa756b2d23f
2010-01-27 16:12:23 -08:00
Barry Hayes
b17772dcc8 Break out create_contiguous_mspace_with_base
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.
2010-01-26 13:35:20 -08:00
Andy McFadden
cf63d5d00f Implementation of open_memstream().
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.
2010-01-25 15:06:03 -08:00
Kenny Root
91a54c11cb Add x86-64 checking for Darwin
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
2010-01-21 11:27:10 -06:00
San Mehat
d674413ff4 sysutils: Add dump() to NetlinkEvent
Signed-off-by: San Mehat <san@google.com>
2009-12-24 07:20:36 -08:00
Mike Reed
83782909a3 am 31b5d4b9: am 45e5ca1c: Merge change I0deb0117 into eclair-mr2
Merge commit '31b5d4b98e8079a1d97aff8dc3e0824b95d1e294'

* commit '31b5d4b98e8079a1d97aff8dc3e0824b95d1e294':
  NDK header for accessing pixels of a java bitmap
2009-12-07 18:30:48 -08:00
Mike Reed
31b5d4b98e am 45e5ca1c: Merge change I0deb0117 into eclair-mr2
Merge commit '45e5ca1c7047b20d36bd31b30b7d2a4786baab0f' into eclair-mr2-plus-aosp

* commit '45e5ca1c7047b20d36bd31b30b7d2a4786baab0f':
  NDK header for accessing pixels of a java bitmap
2009-12-07 06:18:51 -08:00
Mike Reed
22078f2c05 NDK header for accessing pixels of a java bitmap 2009-12-04 09:40:42 -05:00
Dan Bornstein
303254eb67 Define HAVE_SYS_SENDFILE_H.
Platforms differ on whether sys/sendfile.h or sys/socket.h is where to
find the declaration for sendfile().

Change-Id: Ib6e882534b7dc605d30aefed55732dc1ee2b6772
2009-11-17 14:34:12 -08:00
Jean-Baptiste Queru
333a80cf9f merge from eclair 2009-11-15 12:07:12 -08:00
Jean-Baptiste Queru
4b29fe640a eclair snapshot 2009-11-12 18:46:23 -08:00
Dan Bornstein
43ba23f308 Define HAVE_SYS_SENDFILE_H.
Platforms differ on whether sys/sendfile.h or sys/socket.h is where to
find the declaration for sendfile().

Change-Id: Ib6e882534b7dc605d30aefed55732dc1ee2b6772
2009-10-30 17:15:13 -07:00
San Mehat
5f64815d8a am 38b2ddc4: am 17bfbd3c: am c0dfca7a: cutils: Add support for reading a processes scheduler policy
Merge commit '38b2ddc4a7cf1c47397af118a6d466d45f59da04'

* commit '38b2ddc4a7cf1c47397af118a6d466d45f59da04':
  cutils: Add support for reading a processes scheduler policy
2009-10-28 23:50:51 -07:00
San Mehat
38b2ddc4a7 am 17bfbd3c: am c0dfca7a: 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
2009-10-28 11:52:39 -07:00
San Mehat
c0dfca7ae1 cutils: Add support for reading a processes scheduler policy
Signed-off-by: San Mehat <san@google.com>
2009-10-27 12:27:42 -07:00
Jean-Baptiste Queru
573463c31c am 62f39c10: merge from open-source master
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
2009-10-14 16:12:21 -07:00
Jean-Baptiste Queru
b029e92428 merge from open-source master 2009-10-14 08:19:24 -07:00
Jean-Baptiste Queru
7b5f63f8ab am f184b94a: am b084929f: Make AudioPara4 world-readable
Merge commit 'f184b94ad32c50ccf5bb1792a963551b5841e772'

* commit 'f184b94ad32c50ccf5bb1792a963551b5841e772':
  Make AudioPara4 world-readable
2009-10-12 11:08:19 -07:00
San Mehat
ebfe3db361 libsysutils: Fix some bugs in NetlinkListener and NetlinkEvent
Signed-off-by: San Mehat <san@android.com>
2009-10-10 17:39:10 -07:00
Jean-Baptiste Queru
f184b94ad3 am b084929f: Make AudioPara4 world-readable
Merge commit 'b084929f5dd57b878f6debe6567a6c8888061fa0' into eclair

* commit 'b084929f5dd57b878f6debe6567a6c8888061fa0':
  Make AudioPara4 world-readable
2009-10-04 15:05:49 -07:00
Elliott Hughes
67a2ea3dea Now all the callers are gone, remove adb_networking.*.
(This is the final patch removing adb networking.)

Bug: 1122968
2009-10-02 13:29:47 -07:00
Jean-Baptiste Queru
b084929f5d Make AudioPara4 world-readable
This way adb pull can get to it on user builds.

BUG=1869158
2009-10-02 11:25:58 -07:00
Raphael
0384a98d6f Disable sched_policy under Windows.
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
2009-09-15 17:10:17 -07:00
San Mehat
493dad9663 libcutils: Add abstracted support for setting scheduler policies
Also changes the background policy to use SCHED_BATCH. IDLEPRIO
can cause 100% starvation.

Signed-off-by: San Mehat <san@google.com>
2009-09-12 10:48:03 -07:00
Jack Palevich
d5315573d7 Move ARM disassembler out of libacc and into the acc command-line tool. 2009-09-09 13:19:34 -07:00
Doug Zongker
90b06ac786 only use faster SHA-1 code on machines with good libc
Macs don't have byteswap.h or endian.h.  Change conditionals to only
use the faster SHA-1 code on little-endian machines with byteswap.h.
2009-08-21 11:08:25 -07:00
Doug Zongker
a6de77de17 add optimized SHA1 algorithm
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.
2009-08-17 15:38:31 -07:00
Andy McFadden
656a816298 Added defines for <stdint.h> and <stdbool.h>.
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.
2009-08-05 14:14:32 -07:00
Shin-ichiro KAWASAKI
c6af9114fc added SuperH atomic support to libcutils 2009-08-04 19:14:22 +09:00
Jean-Baptiste Queru
96d58f4f52 Merge korg/donut into korg/master 2009-07-25 18:07:41 -07:00
Jack Palevich
8c246a9dc2 Add accRegisterSymbolCallback API to control external symbol linkage.
Until now dlsym was used to lookup external symbols. Now you can
register your own function to be called when an undefined symbol is
used.
2009-07-14 21:14:10 -07:00
San Mehat
c4a895b709 nexus: Rollup update for nexus
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>
2009-07-10 14:23:51 -07:00
Mathias Agopian
bfa833c0b7 Merge commit 'goog/master' into merge_master 2009-07-01 18:33:22 -07:00
repo sync
60a4cd5e34 resolved conflicts for merge of abb08550 to master 2009-06-30 11:09:06 +08:00
Chia-chi Yeh
88dc657d50 Add device, property, directory, and file permissions for VPN. 2009-06-19 15:53:28 +08:00
Mathias Agopian
a10fd8df95 Merge commit 'goog/master' into merge_master 2009-06-16 12:39:01 -07:00
Android (Google) Code Review
338df9da54 am 2d0a6ca2: Merge change 4227 into donut
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.
2009-06-15 14:41:33 -07:00
San Mehat
c73a3a5771 libsysutils: Move to a null terminated string protocol using space as a field separator.
Also removes some debugging

Signed-off-by: San Mehat <san@google.com>
2009-06-15 14:06:03 -07:00
Jaikumar Ganesh
1d36696821 Bluez4 changes
Rename hcid to bluetoothd and change permissions.
2009-06-09 17:21:38 -07:00
Chung-yih Wang
50900772ed am 1f75d709: Add VPN and Keystore services and data directories.
Merge commit '1f75d709c10f49d2e2390b888e766bcfd17da860'

* commit '1f75d709c10f49d2e2390b888e766bcfd17da860':
  Add VPN and Keystore services and data directories.
2009-06-08 20:01:48 -07:00
Chung-yih Wang
1f75d709c1 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.
2009-06-09 10:49:39 +08:00
Mathias Agopian
ce51b3b55f break dependency on utils/Endian.h 2009-06-07 02:13:02 -07:00
Mathias Agopian
af20325a45 Merge commit 'goog/master' into merge_master 2009-06-05 15:45:43 -07:00
Jack Palevich
eedf9d2083 Add support for #pragma foo(bar)
Report unsupported/unknown preprocessor directives.
Report line number of error rather than character offset.
2009-06-04 16:38:35 -07:00
Android (Google) Code Review
baf83e0250 am 3f627205: Merge change 2875 into donut
Merge commit '3f6272056275a00c30c07394d63bbe81cc9c5eba'

* commit '3f6272056275a00c30c07394d63bbe81cc9c5eba':
  Added ashmem_get_size_region() function.
2009-06-02 05:30:08 -07:00
Bjorn Bringert
7be52b1a0e Added ashmem_get_size_region() function.
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.
2009-06-02 00:55:30 +01:00
Mathias Agopian
e26cbeacaf Merge commit 'goog/master' into merge_master 2009-05-31 01:14:49 -07:00
Nick Pelly
260f48a917 Helper to perform abortable blocking operations on a socket:
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.
2009-05-29 16:10:16 -07:00
David 'Digit' Turner
730c8d7c03 am ebefc48e: Expose the stable/frozen log-related definitions of <cutils/logd.h> into a new header: <android/log.h>
Merge commit 'ebefc48e61a7d5cf2a3228e6c8729feeeb42d1b4'

* commit 'ebefc48e61a7d5cf2a3228e6c8729feeeb42d1b4':
  Expose the stable/frozen log-related definitions of <cutils/logd.h> into a new header: <android/log.h>
2009-05-29 06:03:27 -07:00
David 'Digit' Turner
ebefc48e61 Expose the stable/frozen log-related definitions of <cutils/logd.h> into a new header: <android/log.h>
This is in order to expose the correponding functions in the 1.5 Native Development Kit, to allow
applicative native code to send messages to the log.
2009-05-29 14:45:04 +02:00
Mathias Agopian
1edfd382ba Merge commit 'goog/master' into merge_master 2009-05-27 14:25:54 -07:00
Jack Palevich
1cdef20774 Convert libacc into a shared library.
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.
2009-05-22 12:09:55 -07:00
Mathias Agopian
67667115c5 merge master to master_gl 2009-05-22 01:08:01 -07:00
Mathias Agopian
d2362c2b20 am fee77ec0: don\'t use cdefs.h as it breaks the windows build.
Merge commit 'fee77ec093f78c1bb0ce85aa16d7ee8e8fa06f8a'

* commit 'fee77ec093f78c1bb0ce85aa16d7ee8e8fa06f8a':
  don't use cdefs.h as it breaks the windows build.
2009-05-21 13:11:11 -07:00
Mathias Agopian
fee77ec093 don't use cdefs.h as it breaks the windows build. 2009-05-21 13:08:39 -07:00
San Mehat
e7ada79392 am db017545: libsysutils: const correctness fixes + remove some debugging
Merge commit 'db017545796747115b8797f03e662b0f398a7c7b'

* commit 'db017545796747115b8797f03e662b0f398a7c7b':
  libsysutils: const correctness fixes + remove some debugging
2009-05-20 17:36:18 -07:00
Mathias Agopian
3fc51ba17d move native_handle stuff from master_gl 2009-05-20 17:22:13 -07:00
San Mehat
db01754579 libsysutils: const correctness fixes + remove some debugging
Signed-off-by: San Mehat <san@google.com>
2009-05-20 17:16:05 -07:00
Nick Pelly
92a7541bce Helper to perform abortable blocking operations on a socket:
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.
2009-05-20 15:20:30 -07:00
Mathias Agopian
8f13782e7b move native_handle stuff from master_gl 2009-05-20 14:51:48 -07:00
Android (Google) Code Review
85246fee85 am b48acb0e: Merge change 1795 into donut
Merge commit 'b48acb0ebdc64d2f44cf869ac69aebbba2de192d'

* commit 'b48acb0ebdc64d2f44cf869ac69aebbba2de192d':
  Make /system/xbin/tcpdump setuid root.
2009-05-18 23:56:52 -07:00
Android (Google) Code Review
b48acb0ebd Merge change 1795 into donut
* changes:
  Make /system/xbin/tcpdump setuid root.
2009-05-18 16:35:27 -07:00
David 'Digit' Turner
34c22c5ba9 am 414ff7d9: 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 '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.
2009-05-18 08:37:02 -07:00
David 'Digit' Turner
414ff7d98a 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. 2009-05-18 17:07:46 +02:00
San Mehat
d99d1445fd resolved conflicts w/ b415390e74 merge 2009-05-15 13:02:13 -07:00
Dan Egnor
328a4fb535 Make /system/xbin/tcpdump setuid root. 2009-05-15 12:57:58 -07:00
Android (Google) Code Review
fc1ceb63d5 am dee68663: Merge change 1693 into donut
Merge commit 'dee68663724c7117a51eb3af3d9390e00af832f5'

* commit 'dee68663724c7117a51eb3af3d9390e00af832f5':
  libsysutils: Introduce 'ServiceManager', for starting/stopping init services
2009-05-15 11:51:34 -07:00
Android (Google) Code Review
b415390e74 Merge change 1778 into donut
* changes:
  init: Create new 'vpn' user/group and set owner of '/dev/tun' to it.
2009-05-15 10:47:22 -07:00
Android (Google) Code Review
dee6866372 Merge change 1693 into donut
* changes:
  libsysutils: Introduce 'ServiceManager', for starting/stopping init services
2009-05-15 10:44:06 -07:00
San Mehat
4a6f2321e7 init: Create new 'vpn' user/group and set owner of '/dev/tun' to it.
Signed-off-by: San Mehat <san@google.com>
2009-05-15 10:40:29 -07:00
San Mehat
c41d1c8074 libsysutils: Introduce 'ServiceManager', for starting/stopping init services
Signed-off-by: San Mehat <san@google.com>
2009-05-15 10:40:23 -07:00
Eric Fischer
035b427c70 am 722a5c04: Add support for "standalone months" to tztime\'s strftime().
Merge commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4'

* commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4':
  Add support for "standalone months" to tztime's strftime().
2009-05-15 10:15:18 -07:00
Mathias Agopian
b862ab74c9 Merge commit 'goog/master' into merge_master 2009-05-14 22:32:16 -07:00
Eric Fischer
722a5c0462 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.
2009-05-14 17:22:20 -07:00
San Mehat
294449dd6e am d768066: libsysutils: Tweak SocketListener and friends
Merge commit 'd768066ef54270a0d3ccfccd50ae8238db5a2cdd'

* commit 'd768066ef54270a0d3ccfccd50ae8238db5a2cdd':
  libsysutils: Tweak SocketListener and friends
2009-05-12 14:15:22 -07:00
San Mehat
d768066ef5 libsysutils: Tweak SocketListener and friends
Signed-off-by: San Mehat <san@google.com>
2009-05-12 14:02:32 -07:00
Android (Google) Code Review
e1156972e1 am c73d9e4: Merge changes 1341,1342 into donut
Merge commit 'c73d9e43a0c98a87222ef0c8749d6abba06c7778'

* commit 'c73d9e43a0c98a87222ef0c8749d6abba06c7778':
  libsysutils: Add multiple client support and fix some bugs
  nexus: Implement wifi scanner and fix a lot of bugs
2009-05-11 09:03:29 -07:00
San Mehat
fa644ffe94 libsysutils: Add multiple client support and fix some bugs 2009-05-10 09:26:42 -07:00
Mathias Agopian
ab15ac0881 Merge commit 'goog/master' into merge_master 2009-05-07 17:46:47 -07:00
Android (Google) Code Review
9399844278 am 747baad: Merge change 1092 into donut
Merge commit '747baadddb37737b0ecf83f6147a5e3252a34b12'

* commit '747baadddb37737b0ecf83f6147a5e3252a34b12':
  libsysutils: New C++ system convenience library
2009-05-07 07:06:55 -07:00
San Mehat
168415b822 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>
2009-05-06 15:12:02 -07:00
Mathias Agopian
8cd81ab3f2 get rid of native_handle_{dup|copy} since they were not used any longer 2009-05-02 00:06:41 -07:00
Mathias Agopian
f313711450 Merge commit 'goog/master' into merge_master 2009-04-30 14:08:52 -07:00
Android (Google) Code Review
9fe0f0d14d am 6181f70: Merge change 484 into donut
Merge commit '6181f70bd40fd020661841923e725df75a3a2793'

* commit '6181f70bd40fd020661841923e725df75a3a2793':
  filesystem: Add new group 'sdcard_rw' for restricting sd card write access
2009-04-29 15:17:35 -07:00
San Mehat
6e1f21584f filesystem: Add new group 'sdcard_rw' for restricting sd card write access
Signed-off-by: San Mehat <san@google.com>
2009-04-23 09:15:08 -07:00
Mathias Agopian
cccf42773a fix copyright notice 2009-04-17 15:16:02 -07:00
Mathias Agopian
b5fbd75f6c add a compiler.h to libcutils. it's intended to define compiler-dependent macros.
currently, it defines CC_LIKELY and CC_UNLIKELY.
2009-04-17 14:43:36 -07:00
Mathias Agopian
61d8e487e6 Merge commit 'goog/master' into master_gl 2009-04-10 14:26:14 -07:00
Mathias Agopian
1d3faaf72f Integrate from //sandbox/mathias/donut/...@145728
SurfaceFlinger rework for new EGL driver model support.
2009-04-10 14:24:31 -07:00
The Android Open Source Project
455a6dffd4 Merge branch 'open_source' into google_internal 2009-03-29 08:55:26 -07:00
The Android Open Source Project
b1487e4c58 auto import //branches/master/...@140412 2009-03-18 22:20:28 -07:00
Jean-Baptiste Queru
83b65486be Merge commit 'remotes/korg/cupcake' into merge
Conflicts:
	init/devices.c
	libpixelflinger/Android.mk
2009-03-18 09:29:29 -07:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
1b8e5a6b14 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:54 -08:00
The Android Open Source Project
13f797da7f auto import from //branches/cupcake/...@130745 2009-02-10 15:44:07 -08:00
The Android Open Source Project
1b6345894e Merge branch 'cupcake' 2009-01-20 14:05:44 -08:00
The Android Open Source Project
8ac3a13816 auto import from //branches/cupcake/...@127101 2009-01-20 14:04:01 -08:00
The Android Open Source Project
038862e152 Merge branch 'cupcake' 2009-01-09 18:04:23 -08:00
The Android Open Source Project
5ae090ed94 auto import from //branches/cupcake/...@125939 2009-01-09 17:51:25 -08:00
Jean-Baptiste Queru
77d0c65b95 Merge commit 'remotes/korg/cupcake'
Conflicts:
	init/devices.c
	logwrapper/logwrapper.c
	mountd/AutoMount.c
2008-12-19 08:15:15 -08:00
The Android Open Source Project
35237d1358 Code drop from //branches/cupcake/...@124589 2008-12-17 18:08:08 -08:00
Alexey Tarasov
abb9638e36 1. added macro definitions to AndroidConfig.h
2. removed unnecessary include of <alloca.h>
2008-11-07 11:44:22 +10:00
Alexey Tarasov
57401dc849 Added AndroidConfig.h for FreeBSD 2008-11-03 03:19:27 +10:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00