-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from tpn/issue41-add-_penter-hooking-support
Issue41 add penter hooking support
- Loading branch information
Showing
85 changed files
with
3,787 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*++ | ||
Copyright (c) 2018-2022 Trent Nelson <[email protected]> | ||
Copyright (c) 2018-2023 Trent Nelson <[email protected]> | ||
Module Name: | ||
|
@@ -50,10 +50,14 @@ extern "C" { | |
#endif | ||
|
||
// | ||
// Clang doesn't appear to support the rotate intrinsics _rotr and _rotl, | ||
// so, define some static inline versions here. | ||
// Older versions of clang didn't appear to support the rotate intrinsics _rotr | ||
// and _rotl, so, we used some static inline versions, below. Recent versions | ||
// (10.0+) appear to have the intrinsics, so, disable this block for now. If | ||
// you are compiling on an older version of clang, change the 0 to 1 to get the | ||
// rotate intrinsics back. | ||
// | ||
|
||
#if 0 | ||
static inline | ||
unsigned int | ||
_rotl( | ||
|
@@ -75,6 +79,7 @@ _rotr( | |
b &= 31; | ||
return (a >> b) | (a << (32 - b)); | ||
} | ||
#endif | ||
|
||
#elif defined(__GNUC__) | ||
#include <x86intrin.h> | ||
|
@@ -264,6 +269,30 @@ Return Value: | |
--*/ | ||
typedef COMPILED_PERFECT_HASH_TABLE_DELETE *PCOMPILED_PERFECT_HASH_TABLE_DELETE; | ||
|
||
typedef | ||
CPHAPI | ||
CPHVALUE | ||
(CPHCALLTYPE COMPILED_PERFECT_HASH_TABLE_INTERLOCKED_INCREMENT)( | ||
_In_ CPHKEY Key | ||
); | ||
/*++ | ||
Routine Description: | ||
Increments the value associated with a key. | ||
Arguments: | ||
Key - Supplies the key to increment. | ||
Return Value: | ||
Previous value. | ||
--*/ | ||
typedef COMPILED_PERFECT_HASH_TABLE_INTERLOCKED_INCREMENT | ||
*PCOMPILED_PERFECT_HASH_TABLE_INTERLOCKED_INCREMENT; | ||
|
||
// | ||
// Typedefs of methods for testing and benchmarking. | ||
// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.