[Mini-OS] Make bind_virq return the port

Make bind_virq() return the port bound to the irq, which is useful
e.g. for masking/unmasking it.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
This commit is contained in:
Keir Fraser committed 2007-11-23 16:25:59 +00:00
1 parent fd2f80c255
commit 9ebc5c7ea6
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -267,7 +267,7 @@ init_time(void)
printk("efi_get_time() failed\n");
err = bind_virq(VIRQ_ITC, timer_interrupt, NULL);
if (err != 0) {
if (err == -1) {
printk("XEN timer request chn bind failed %i\n", err);
return;
}
+3 -3
View File
@@ -102,7 +102,7 @@ void unbind_evtchn(evtchn_port_t port )
ev_actions[port].data = NULL;
}
int bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
{
evtchn_bind_virq_t op;
@@ -113,11 +113,11 @@ int bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
if ( HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq, &op) != 0 )
{
printk("Failed to bind virtual IRQ %d\n", virq);
return 1;
return -1;
}
set_bit(op.port,bound_ports);
bind_evtchn(op.port, handler, data);
return 0;
return op.port;
}
#if defined(__x86_64__)
+1 -1
View File
@@ -26,7 +26,7 @@ typedef void (*evtchn_handler_t)(evtchn_port_t, struct pt_regs *, void *);
/* prototypes */
int do_event(evtchn_port_t port, struct pt_regs *regs);
int bind_virq(uint32_t virq, evtchn_handler_t handler, void *data);
evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data);
evtchn_port_t bind_evtchn(evtchn_port_t port, evtchn_handler_t handler,
void *data);
void unbind_evtchn(evtchn_port_t port);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.