1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//! Event Objects.

use ::basedef::DISPATCHER_HEADER;

extern "system"
{
	pub fn KeInitializeEvent(Event: PKEVENT, Type: EVENT_TYPE, State: bool);
	pub fn KeSetEvent(Event: PKEVENT, Increment: i32, Wait: bool) -> i32;
	pub fn KeReadStateEvent(Event: PKEVENT) -> i32;
	pub fn KeResetEvent(Event: PKEVENT) -> i32;
	pub fn KeClearEvent(Event: PKEVENT);
}

pub type PKEVENT = *mut KEVENT;

/// Specifies the event type.
#[repr(C)]
pub enum EVENT_TYPE
{
	/// Manual-reset event.
	NotificationEvent = 0,
	/// Auto-clearing event.
	SynchronizationEvent,
}

/// Event object.
#[repr(C)]
pub struct KEVENT
{
	Header: DISPATCHER_HEADER,
}