[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH MINI-OS v2] xenbus: notify the other end when necessary
Samuel Thibault, le Mon 26 Oct 2015 18:11:04 +0100, a écrit : > diff --git a/tools/ocaml/libs/xb/xb.ml b/tools/ocaml/libs/xb/xb.ml > index 50944b5..33298d2 100644 > --- a/tools/ocaml/libs/xb/xb.ml > +++ b/tools/ocaml/libs/xb/xb.ml > @@ -91,10 +91,12 @@ let write_fd back con s len = > Unix.write back.fd s 0 len > > let write_mmap back con s len = > - let ws = Xs_ring.write back.mmap s len in > - if ws > 0 then > + let ws = ref (Xs_ring.write back.mmap s len) in > + if !ws < len then > + ws := !ws + Xs_ring.write back.mmap (String.sub s !ws > (len-!ws)) (len-!ws); > + if !ws > 0 then > back.eventchn_notify (); > - ws > + !ws > > let write con s len = > match con.backend with Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Not-tested-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Not-even-compiled-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Samuel _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |