[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 3/3] libxl: ocaml: use 'for_app_registration' in osevent callbacks
On Mon, 2013-12-16 at 11:35 +0000, Ian Campbell wrote: > On Fri, 2013-12-13 at 18:04 +0000, Rob Hoes wrote: > > On 13 Dec 2013, at 17:24, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote: > > > Rob Hoes writes ("[PATCH v2 3/3] libxl: ocaml: use 'for_app_registration' > > > in osevent callbacks"): > > >> This allows the application to pass a token to libxl in the fd/timeout > > >> registration callbacks, which it receives back in modification or > > >> deregistration callbacks. > > > ... > > >> + *for_app = caml_callbackN_exn(*func, 4, args); > > >> + if (Is_exception_result(*for_app)) { > > >> + ret = ERROR_OSEVENT_REG_FAIL; > > >> + goto err; > > >> + } > > >> + > > >> + caml_register_global_root(for_app); > > >> + *for_app_registration_out = for_app; > > >> + > > >> +err: > > >> CAMLdone; > > >> caml_enter_blocking_section(); > > >> - return 0; > > >> + return ret; > > > > > > Doesn't this have the effect of throwing away the exception > > > information ? Perhaps it should be logged somewhere. > > > > Thatâs true. > > *for_app eventually ends up in a caller which is in the C bindings, > doesn't it? Can it not be picked up there and reused with caml_raise > after the appropriate C level cleanup? Nevermind -- that eventual caller is just some random call down into libxl... > > > What would be the best way to do that? Can we get the logger from the > > context in these stubs? If not, itâs going to be a little more > > complicated... If we can, then still we need to add the ctx to the > > âuserâ value that is passed around. > > > > Rob > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |