drm_event_reserve_init_locked — init a DRM event and reserve space for it
int drm_event_reserve_init_locked ( | struct drm_device * dev, |
struct drm_file * file_priv, | |
struct drm_pending_event * p, | |
struct drm_event * e) ; |
dev
DRM device
file_priv
DRM file private data
p
tracking structure for the pending event
e
actual event data to deliver to userspace
This function prepares the passed in event for eventual delivery. If the event
doesn't get delivered (because the IOCTL fails later on, before queuing up
anything) then the even must be cancelled and freed using
drm_event_cancel_free
. Successfully initialized events should be sent out
using drm_send_event
or drm_send_event_locked
to signal completion of the
asynchronous event to userspace.
If callers embedded p
into a larger structure it must be allocated with
kmalloc and p
must be the first member element.
This is the locked version of drm_event_reserve_init
for callers which
already hold dev->event_lock.