Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 359c525

Browse files
committedSep 15, 2011
[xen] provider skeleton for blkif
1 parent 7966d6e commit 359c525

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 

‎lib/os/xen/blkif.ml

+22
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,25 @@ let read_512 t sector num_sectors =
339339
)
340340
)
341341
)
342+
343+
let provider_t () =
344+
let plug_mvar = Lwt_mvar.create_empty () in
345+
let unplug_mvar = Lwt_mvar.create_empty () in
346+
let provider = object(self)
347+
method id = "Xen.Blkif"
348+
method plug = plug_mvar
349+
method unplug = unplug_mvar
350+
method create ~deps ~cfg id =
351+
lwt blkif = create ~id in
352+
let entry = Devices.({
353+
provider=self;
354+
id=self#id;
355+
depends=[];
356+
node=Blkif blkif }) in
357+
return entry
358+
end in
359+
(* Watch xenstore *)
360+
Main.at_enter (fun () ->
361+
(* TODO *)
362+
return ()
363+
)

0 commit comments

Comments
 (0)
Please sign in to comment.