From owner-cvs-src@FreeBSD.ORG Wed Aug 4 18:22:50 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E76C16A4CE; Wed, 4 Aug 2004 18:22:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6265443D60; Wed, 4 Aug 2004 18:22:50 +0000 (GMT) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i74IMo0q033638; Wed, 4 Aug 2004 18:22:50 GMT (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i74IMoDE033637; Wed, 4 Aug 2004 18:22:50 GMT (envelope-from wpaul) Message-Id: <200408041822.i74IMoDE033637@repoman.freebsd.org> From: Bill Paul Date: Wed, 4 Aug 2004 18:22:50 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ndis.c subr_ntoskrnl.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2004 18:22:50 -0000 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