Reactos
at master 23 lines 735 B view raw
1#ifndef _BACKPACK_ 2#define _BACKPACK_ 3 4typedef struct _THROTTLING_STATE 5{ 6 LARGE_INTEGER NextTime; 7 volatile ULONG CurrentIncrement; 8 ULONG MaximumDelay; 9 LARGE_INTEGER Increment; 10 volatile ULONG NumberOfQueries; 11} THROTTLING_STATE, *PTHROTTLING_STATE; 12 13#define RxInitializeThrottlingState(BP, Inc, MaxDelay) \ 14{ \ 15 if ((Inc) > 0) \ 16 { \ 17 (BP)->Increment.QuadPart = (Inc) * 10000; \ 18 (BP)->MaximumDelay = (MaxDelay) / (Inc); \ 19 (BP)->CurrentIncrement = 0; \ 20 } \ 21} 22 23#endif