mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
xen/event: Add reference counting to event channels
Event channels exposed to userspace by the evtchn module may be used by other modules in an asynchronous manner, which requires that reference counting be used to prevent the event channel from being closed before the signals are delivered. The reference count on new event channels defaults to -1 which indicates the event channel is not referenced outside the kernel; evtchn_get fails if called on such an event channel. The event channels made visible to userspace by evtchn have a normal reference count. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
0cc678f850
commit
420eb554d5
3 changed files with 81 additions and 2 deletions
|
@ -37,6 +37,13 @@ int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain,
|
|||
*/
|
||||
void unbind_from_irqhandler(unsigned int irq, void *dev_id);
|
||||
|
||||
/*
|
||||
* Allow extra references to event channels exposed to userspace by evtchn
|
||||
*/
|
||||
int evtchn_make_refcounted(unsigned int evtchn);
|
||||
int evtchn_get(unsigned int evtchn);
|
||||
void evtchn_put(unsigned int evtchn);
|
||||
|
||||
void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector);
|
||||
int resend_irq_on_evtchn(unsigned int irq);
|
||||
void rebind_evtchn_irq(int evtchn, int irq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue