diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-10-06 00:34:15 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-10-06 00:34:36 +0200 |
| commit | 7bfde778a419e0bd34c708ebe0c7eebab42f8637 (patch) | |
| tree | 3137fc967aaa03c653886b660e7a53254b87ee96 /library/std/src/sys/windows | |
| parent | 92f7ba8446d397bb92f68ea1b45fd893d9410b86 (diff) | |
| download | rust-7bfde778a419e0bd34c708ebe0c7eebab42f8637.tar.gz rust-7bfde778a419e0bd34c708ebe0c7eebab42f8637.zip | |
Add Keyed Events API to sys::windows::c.
Diffstat (limited to 'library/std/src/sys/windows')
| -rw-r--r-- | library/std/src/sys/windows/c.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs index 6a088b91b51..33de486c309 100644 --- a/library/std/src/sys/windows/c.rs +++ b/library/std/src/sys/windows/c.rs @@ -31,6 +31,8 @@ pub type WORD = u16; pub type CHAR = c_char; pub type ULONG_PTR = usize; pub type ULONG = c_ulong; +pub type NTSTATUS = LONG; +pub type ACCESS_MASK = DWORD; pub type LPBOOL = *mut BOOL; pub type LPBYTE = *mut BYTE; @@ -286,6 +288,8 @@ pub const STACK_SIZE_PARAM_IS_A_RESERVATION: DWORD = 0x00010000; pub const HEAP_ZERO_MEMORY: DWORD = 0x00000008; +pub const STATUS_SUCCESS: NTSTATUS = 0x00000000; + #[repr(C)] #[cfg(not(target_pointer_width = "64"))] pub struct WSADATA { @@ -1111,3 +1115,31 @@ compat_fn! { // WaitOnAddress would've panicked. So it's fine to do nothing here. } } + +compat_fn! { + "ntdll": + pub fn NtCreateKeyedEvent( + KeyedEventHandle: LPHANDLE, + DesiredAccess: ACCESS_MASK, + ObjectAttributes: LPVOID, + Flags: ULONG + ) -> NTSTATUS { + panic!("keyed events not available") + } + pub fn NtReleaseKeyedEvent( + EventHandle: HANDLE, + Key: LPVOID, + Alertable: BOOLEAN, + Timeout: PLARGE_INTEGER + ) -> NTSTATUS { + panic!("keyed events not available") + } + pub fn NtWaitForKeyedEvent( + EventHandle: HANDLE, + Key: LPVOID, + Alertable: BOOLEAN, + Timeout: PLARGE_INTEGER + ) -> NTSTATUS { + panic!("keyed events not available") + } +} |
