aboutsummaryrefslogtreecommitdiffstats
path: root/android/async-utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Make all async I/O object referenced.Vladimir Chtchetkine2012-04-031-0/+11
| | | | | | | | | Since it's hard to control lifespan of an object in asynchronous environment, we should make all AsyncXxx objects a referenced objecst, that will self-destruct when its reference count drops to zero, indicating that the last client that used the object has abandoned it. Change-Id: I6f8194aa14e52a23a8772d827583782989654504
* Implements sensors emulation using a connected Android deviceVladimir Chtchetkine2011-11-091-7/+12
| | | | | | | | | | | | | | There are three major things in this CL: 1. Abstract a connection with an Android device that is connected to the host via USB, and there is a TCP port forwarding to this device via 'adb forward' command. This abstraction is implemented in android/android-device.* 2. A client for android device API that talks to an app on the connected device that provides values for sensors available on the device. This is implemented in android/sensors-port.* 3. Changes to the sensor emulation code in android/hw-sensors.c to use sensors port (when available) for sensors emulation. Change-Id: I12901e8db6b6a6262fc1703ed96a9f714335d666
* Simplify async utils by removing extra LoopIo parameter.David 'Digit' Turner2011-04-111-18/+17
| | | | | | | | | | | | | | | This patch removes the LoopIo parameter from asyncReader_run() by storing the initial pointer passed to asyncReader_init() inside the object itself. Same treatment is performed for: - AsyncReader - AsyncWriter - AsyncLineReader - AsyncConnector - AsyncConsoleConnect Change-Id: Ic74b817e4c326230ca1d38b3a5d8c4790c4f90c1
* Fix emulator core and UI on WindowsVladimir Chtchetkine2011-02-071-4/+4
| | | | | | | | There are two parts in this CL: 1. Fixing the Windows build (missing set_fd_handler) 2. Replacing read/write with socket_recv/socket_send. Change-Id: I5fa599774260257d481b738a892e1124135fc319
* Introduce asynchronous operation helpers.David 'Digit' Turner2010-11-191-0/+266
<android/async-utils.h> contains generic helpers to read, write and connect to sockets. <android/async-console.h> contains a helper class to connect to Android console port asynchronously. Change-Id: I5d0a49a770ad974c5d4382438d75e9eb624368d1