|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 21/28] libxl: ocaml: add wrappers for poll
> On 25/03/13 14:45, Rob Hoes wrote:
> > +value Val_poll(short event)
> > +{
> > + CAMLparam0();
> > + CAMLlocal1(res);
> > +
> > + switch (event) {
> > + case POLLIN: res = Val_int(0); break;
> > + case POLLPRI: res = Val_int(1); break;
> > + case POLLOUT: res = Val_int(2); break;
> > + case POLLERR: res = Val_int(3); break;
> > + case POLLHUP: res = Val_int(4); break;
> > + case POLLNVAL: res = Val_int(5); break;
> > + }
> > +
> > + CAMLreturn(res);
> > +}
>
> Is it possible for none of the cases to match? If so, what would you like to
> happen-- it's worth being more explicit.
I'll probably add some sort of exception handling, or an "unknown" error state.
Cheers,
Rob
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |