]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/event: Add reference counting to event channels
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 27 Oct 2011 21:58:47 +0000 (17:58 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 2 Feb 2012 19:00:21 +0000 (14:00 -0500)
commit272a13c450204c90f57b74fa1769ad24ead7ffe1
treefd459364e700aee30bca4d5424b6a77ced860443
parent999d5076aa10bfb1e7b26539e7f1fdd0635c3cf1
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>
drivers/xen/events.c
drivers/xen/evtchn.c
include/xen/events.h