Skip to content

Commit

Permalink
[XDK] Fix / improve some definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
tkreuzer committed Oct 8, 2023
1 parent 42c93e3 commit 8c61b3e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 34 deletions.
36 changes: 21 additions & 15 deletions sdk/include/xdk/rtltypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ typedef LPOSVERSIONINFOA LPOSVERSIONINFO;
#endif /* UNICODE */

$endif (_WDMDDK_)
$if (_NTDDK_)
$if (_NTDDK_ || _WINNT_)

#ifndef _RTL_RUN_ONCE_DEF
#define _RTL_RUN_ONCE_DEF
Expand All @@ -309,6 +309,26 @@ typedef LPOSVERSIONINFOA LPOSVERSIONINFO;

#define RTL_RUN_ONCE_CTX_RESERVED_BITS 2

typedef union _RTL_RUN_ONCE {
PVOID Ptr;
} RTL_RUN_ONCE, *PRTL_RUN_ONCE;

typedef
_Function_class_(RTL_RUN_ONCE_INIT_FN)
_IRQL_requires_same_
ULONG
NTAPI
RTL_RUN_ONCE_INIT_FN(
_Inout_ PRTL_RUN_ONCE RunOnce,
_Inout_opt_ PVOID Parameter,
_Inout_opt_ PVOID* Context);
typedef RTL_RUN_ONCE_INIT_FN* PRTL_RUN_ONCE_INIT_FN;

#endif /* _RTL_RUN_ONCE_DEF */

$endif(_NTDDK_ || _WINNT_)
$if(_NTDDK_)

#define RTL_HASH_ALLOCATED_HEADER 0x00000001

#define RTL_HASH_RESERVED_SIGNATURE 0
Expand Down Expand Up @@ -345,20 +365,6 @@ typedef LPOSVERSIONINFOA LPOSVERSIONINFO;
#define VER_PLATFORM_WIN32_WINDOWS 1
#define VER_PLATFORM_WIN32_NT 2

typedef union _RTL_RUN_ONCE {
PVOID Ptr;
} RTL_RUN_ONCE, *PRTL_RUN_ONCE;

_Function_class_(RTL_RUN_ONCE_INIT_FN)
_IRQL_requires_same_
typedef ULONG /* LOGICAL */
(NTAPI *PRTL_RUN_ONCE_INIT_FN) (
_Inout_ PRTL_RUN_ONCE RunOnce,
_Inout_opt_ PVOID Parameter,
_Inout_opt_ PVOID *Context);

#endif /* _RTL_RUN_ONCE_DEF */

typedef enum _TABLE_SEARCH_RESULT {
TableEmptyTree,
TableFoundNode,
Expand Down
1 change: 1 addition & 0 deletions sdk/include/xdk/winnt.template.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ extern "C" {
$include(interlocked.h)
$include(ketypes.h)
$include(extypes.h)
$include(rtltypes.h)
$include(winnt_old.h)

#ifdef __cplusplus
Expand Down
19 changes: 0 additions & 19 deletions sdk/include/xdk/winnt_old.h
Original file line number Diff line number Diff line change
Expand Up @@ -2749,25 +2749,6 @@ NTAPI
RtlQueryDepthSList(
_In_ PSLIST_HEADER ListHead);

#ifndef _RTL_RUN_ONCE_DEF
#define _RTL_RUN_ONCE_DEF

#define RTL_RUN_ONCE_CHECK_ONLY 0x00000001UL
#define RTL_RUN_ONCE_ASYNC 0x00000002UL
#define RTL_RUN_ONCE_INIT_FAILED 0x00000004UL

#define RTL_RUN_ONCE_CTX_RESERVED_BITS 2

#define RTL_RUN_ONCE_INIT {0}

typedef union _RTL_RUN_ONCE {
PVOID Ptr;
} RTL_RUN_ONCE, *PRTL_RUN_ONCE;

typedef DWORD WINAPI RTL_RUN_ONCE_INIT_FN(PRTL_RUN_ONCE, PVOID, PVOID*);
typedef RTL_RUN_ONCE_INIT_FN *PRTL_RUN_ONCE_INIT_FN;

#endif

#define RTL_CONDITION_VARIABLE_INIT {0}
#define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED 0x1
Expand Down

0 comments on commit 8c61b3e

Please sign in to comment.