diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 2004-02-07 06:44:13 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 2004-02-07 06:44:13 +0000 |
| commit | 9ec55855858e0071d9db8c184426c4d738700394 (patch) | |
| tree | 41bad94309044d1fa9579a2ebc2a9789d0cc8029 /sys/compat/ndis/subr_hal.c | |
| parent | 1e6466b61eba73034845323c0ad6eaf4044476c9 (diff) | |
Notes
Diffstat (limited to 'sys/compat/ndis/subr_hal.c')
| -rw-r--r-- | sys/compat/ndis/subr_hal.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/compat/ndis/subr_hal.c b/sys/compat/ndis/subr_hal.c index f3bb2fd73aed..c324d3f3e7cd 100644 --- a/sys/compat/ndis/subr_hal.c +++ b/sys/compat/ndis/subr_hal.c @@ -79,6 +79,7 @@ __stdcall static void hal_readport_buf_uchar(uint8_t *, __stdcall static uint8_t hal_lock(/*kspin_lock * */void); __stdcall static void hal_unlock(/*kspin_lock *, uint8_t*/void); __stdcall static uint8_t hal_irql(void); +__stdcall static uint64_t hal_perfcount(uint64_t *); __stdcall static void dummy (void); extern struct mtx_pool *ndis_mtxpool; @@ -231,7 +232,17 @@ hal_unlock(/*lock, newirql*/void) __stdcall static uint8_t hal_irql(void) { - return(0); + return(DISPATCH_LEVEL); +} + +__stdcall static uint64_t +hal_perfcount(freq) + uint64_t *freq; +{ + if (freq != NULL) + *freq = hz; + + return((uint64_t)ticks); } __stdcall @@ -258,6 +269,7 @@ image_patch_table hal_functbl[] = { { "KfAcquireSpinLock", (FUNC)hal_lock }, { "KfReleaseSpinLock", (FUNC)hal_unlock }, { "KeGetCurrentIrql", (FUNC)hal_irql }, + { "KeQueryPerformanceCounter", (FUNC)hal_perfcount }, /* * This last entry is a catch-all for any function we haven't |
