CAMLprim value stub_eventchn_bind_dom_exc_virq(value xce) { evtchn_port_or_error_t rc; rc = xc_evtchn_bind_virq(_H(xce), VIRQ_DOM_EXC); if (rc == -1) caml_failwith("evtchn bind_dom_exc_virq failed"); return Val_int(rc); }
CAMLprim value stub_eventchn_bind_dom_exc_virq(value xce) { CAMLparam1(xce); CAMLlocal1(port); evtchn_port_or_error_t rc; rc = xc_evtchn_bind_virq(_H(xce), VIRQ_DOM_EXC); if (rc == -1) caml_failwith("evtchn bind_dom_exc_virq failed"); port = Val_int(rc); CAMLreturn(port); }
CAMLprim value stub_eventchn_bind_dom_exc_virq(value xce) { CAMLparam1(xce); evtchn_port_or_error_t rc; rc = xc_evtchn_bind_virq(_H(xce), VIRQ_DOM_EXC); if (rc == -1) { perror("xc_evtchn_bind_virq"); caml_failwith(strerror(errno)); } CAMLreturn(Val_int(rc)); }
/* Stolen from xenstore code */ static int eventchn_init(void) { int rc; // to revert to old way: if (0) return -1; xce_handle = xc_evtchn_open(); if (xce_handle < 0) perror("Failed to open evtchn device"); if ((rc = xc_evtchn_bind_virq(xce_handle, VIRQ_TBUF)) == -1) perror("Failed to bind to domain exception virq port"); virq_port = rc; return xce_handle; }