mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 01:12:58 -05:00
sys: DEBUGRANDTEST()
This commit is contained in:
@ -261,4 +261,22 @@ const char *FsInformationClassSym(FS_INFORMATION_CLASS FsInformationClass)
|
||||
return "FS_INFORMATION_CLASS:Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
ULONG DebugRandom(VOID)
|
||||
{
|
||||
static KSPIN_LOCK SpinLock = 0;
|
||||
static ULONG Seed = 1;
|
||||
KIRQL Irql;
|
||||
ULONG Result;
|
||||
|
||||
KeAcquireSpinLock(&SpinLock, &Irql);
|
||||
|
||||
/* see ucrt sources */
|
||||
Seed = Seed * 214013 + 2531011;
|
||||
Result = (Seed >> 16) & 0x7fff;
|
||||
|
||||
KeReleaseSpinLock(&SpinLock, Irql);
|
||||
|
||||
return Result;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user