Date: Wed, 4 Aug 2004 18:22:50 +0000 (UTC) From: Bill Paul <wpaul@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ndis.c subr_ntoskrnl.c Message-ID: <200408041822.i74IMoDE033637@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
wpaul 2004-08-04 18:22:50 UTC FreeBSD src repository Modified files: sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ndis.c subr_ntoskrnl.c Log: More minor cleanups and one small bug fix: - In ntoskrnl_var.h, I had defined compat macros for ntoskrnl_acquire_spinlock() and ntoskrnl_release_spinlock() but never used them. This is fortunate since they were stale. Fix them to work properly. (In Windows/x86 KeAcquireSpinLock() is a macro that calls KefAcquireSpinLock(), which lives in HAL.dll. To imitate this, ntoskrnl_acquire_spinlock() is just a macro that calls hal_lock(), which lives in subr_hal.o.) - Add macros for ntoskrnl_raise_irql() and ntoskrnl_lower_irql() that call hal_raise_irql() and hal_lower_irql(). - Use these macros in kern_ndis.c, subr_ndis.c and subr_ntoskrnl.c. - Along the way, I realised subr_ndis.c:ndis_lock() was not calling hal_lock() correctly (it was using the FASTCALL2() wrapper when in reality this routine is FASTCALL1()). Using the ntoskrnl_acquire_spinlock() fixes this. Not sure if this actually caused any bugs since hal_lock() would have just ignored what was in %edx, but it was still bogus. This hides many of the uses of the FASTCALLx() macros which makes the code a little cleaner. Should not have any effect on generated object code, other than the one fix in ndis_lock(). Revision Changes Path 1.59 +12 -12 src/sys/compat/ndis/kern_ndis.c 1.17 +4 -4 src/sys/compat/ndis/ntoskrnl_var.h 1.65 +8 -12 src/sys/compat/ndis/subr_ndis.c 1.42 +8 -8 src/sys/compat/ndis/subr_ntoskrnl.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408041822.i74IMoDE033637>