]> git.baikalelectronics.ru Git - kernel.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>
Mon, 21 Nov 2011 22:14:48 +0000 (17:14 -0500)
commitb303e62b446c19a1b47004fea38db388e80af8b2
tree0c8b69dbc2de5aea96be93a24a8b39dbb9256b88
parent988e7aea9be835770a16036edbb2ffa6a48f8d47
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