aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/hw-qemud.c6
-rw-r--r--docs/ANDROID-QEMUD.TXT17
2 files changed, 17 insertions, 6 deletions
diff --git a/android/hw-qemud.c b/android/hw-qemud.c
index 16deae8..9bfeaff 100644
--- a/android/hw-qemud.c
+++ b/android/hw-qemud.c
@@ -21,8 +21,7 @@
#include "charpipe.h"
#include "cbuffer.h"
-//#define D(...) VERBOSE_PRINT(qemud,__VA_ARGS__)
-#define D(...) printf(__VA_ARGS__), printf("\n")
+#define D(...) VERBOSE_PRINT(qemud,__VA_ARGS__)
#define D_ACTIVE VERBOSE_CHECK(qemud)
/* the T(...) macro is used to dump traffic */
@@ -940,7 +939,6 @@ qemud_client_load(QEMUFile* f, QemudService* current_services )
}
/* re-connect client */
- // TODO: Save / load is_pipe here!
QemudClient* c = qemud_service_connect_client(sv, channel);
if(c == NULL)
return -EIO;
@@ -1946,7 +1944,7 @@ _qemudPipe_poll(void* opaque)
QemudClient* client = pipe->client;
unsigned ret = PIPE_WAKE_WRITE;
if (client->ProtocolSelector.Pipe.messages != NULL) {
- ret |= PIPE_WAKE_WRITE;
+ ret |= PIPE_WAKE_READ;
}
return ret;
diff --git a/docs/ANDROID-QEMUD.TXT b/docs/ANDROID-QEMUD.TXT
index 7841399..8b4f8d6 100644
--- a/docs/ANDROID-QEMUD.TXT
+++ b/docs/ANDROID-QEMUD.TXT
@@ -6,7 +6,9 @@ I. Overview:
The Android system image includes a small daemon program named "qemud"
which is started at boot time. Its purpose is to provide a multiplexing
communication channel between the emulated system and the emulator program
-itself.
+itself. Another way to support communication between the emulated system and
+the emulator program is using qemu pipes (see ANDROID-QEMU-PIPE.TXT for details
+on qemu pipes).
Its goal is to allow certain parts of the system to talk directly to the
emulator without requiring special kernel support; this simplifies a lot of
@@ -169,6 +171,17 @@ Since the "cupcake" platform, this works as follows:
Certain services do not need it at all (GSM, GPS) so it is optional and
must be used depending on which service you talk to by clients.
+- QEMU pipe communication model works similarly to the serial port multiplexing,
+ but also has some differences as far as connecting client with the service is
+ concerned:
+
+ emulator <-+--> /dev/qemu_pipe/qemud:srv1 <---> client1
+ |
+ +--> /dev/qemu_pipe/qemud:srv2 <---> client2
+
+ In the pipe model each client gets connected to the emulator through a unique
+ handle to /dev/qemu_pipe (a "pipe"), so there is no need for multiplexing the
+ channels.
III. Legacy 'qemud':
--------------------
@@ -254,7 +267,7 @@ only uses a single socket and allows concurrent clients for a all services.
IV. State snapshots:
--------------------
-Support for snapshots relies on the symmetric qemud_*_save and qemud_*_load
+Support for snapshots relies on the symmetric qemud_*_save and qemud_*_load
functions which save the state of the various Qemud* structs defined in
android/hw-qemud.c. The high-level process is as follows.