Permalink
Browse files

Misc debugging/incremental stuff

  • Loading branch information...
1 parent 4e03624 commit 34e51e46092e10c15620f9f89e5be16a5ab75389 David Scott committed Sep 4, 2012
Showing with 13 additions and 11 deletions.
  1. +6 −6 README
  2. +1 −1 _oasis
  3. +4 −4 xen/server_xen.ml
  4. +2 −0 xen/xs_transport_domain.ml
View
12 README
@@ -1,7 +1,7 @@
-This repo contains an ocaml xenstore client, a merge of the Mirage and XCP ones.
+This repo contains:
+ 1. a xenstore client library, a merge of the Mirage and XCP ones
+ 2. a xenstore server library
+ 3. a xenstore server instance which runs under Unix with libxc
+ 4. a xenstore server instance which runs on mirage.
-The aims are:
-1. to have a large common policy-free protocol library with unit-tests
-2. to allow the use of Lwt or not
-3. to run in both Mirage and Unix environments
-4. to provide a simpler watch interface without tokens but with cancellation
+The client and the server libraries have sets of unit-tests.
View
2 _oasis
@@ -116,7 +116,7 @@ Flag unix
Flag xen
Description: Build xen kernels
- Default: true
+ Default: false
Test xs_test
Run$: flag(tests)
View
@@ -15,9 +15,9 @@
open Lwt
open Xs_protocol
-let debug fmt = Logging.debug "server_unix" fmt
-let warn fmt = Logging.warn "server_unix" fmt
-let error fmt = Logging.error "server_unix" fmt
+let debug fmt = Logging.debug "server_xen" fmt
+let warn fmt = Logging.warn "server_xen" fmt
+let error fmt = Logging.error "server_xen" fmt
module DomainServer = Xs_server.Server(Xs_transport_domain)
@@ -47,7 +47,7 @@ let introduce_dom0 () =
()
| Some port ->
Introduce.(introduce { domid = 0; mfn = 0n; remote_port = port });
- debug "Introduced domain 0"
+ debug "Introduced domain 0 with port = %d" port
let main () =
debug "Mirage xenstored starting";
@@ -102,6 +102,7 @@ let create_domain address =
} in
let (background_thread: unit Lwt.t) =
while_lwt true do
+ debug "Waiting for signal from domid %d on local port %d (remote port %d)" address.domid port address.remote_port;
lwt () = Activations.wait port in
debug "Waking domid %d" d.address.domid;
Lwt_condition.broadcast d.c ();
@@ -122,6 +123,7 @@ let rec read t buf ofs len =
let n = Ring.Xenstore.unsafe_read t.ring buf (* ofs *) len in
if n = 0
then begin
+ debug "read of 0, blocking";
lwt () = Lwt_condition.wait t.c in
read t buf ofs len
end else begin

0 comments on commit 34e51e4

Please sign in to comment.