- Add -Wall and -Werror compile flags and fix resulting problems

- Reimplement KeAcquireSpinLockRaiseToSynch with the help of Vizzini

svn path=/trunk/; revision=6534
This commit is contained in:
Gé van Geldorp 2003-11-05 22:37:42 +00:00
parent 310f723526
commit 7a2ebc71ae
3 changed files with 20 additions and 7 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.11 2003/08/07 04:03:22 royce Exp $
# $Id: Makefile,v 1.12 2003/11/05 22:37:42 gvg Exp $
PATH_TO_TOP = ../..
@ -26,7 +26,7 @@ TARGET_LIBPATH = .
TARGET_ASFLAGS = -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/ntoskrnl/include -D__ASM__
TARGET_CFLAGS = -I./include -I$(PATH_TO_TOP)/ntoskrnl/include -g
TARGET_CFLAGS = -I./include -I$(PATH_TO_TOP)/ntoskrnl/include -Wall -Werror
# require os code to explicitly request A/W version of structs/functions
TARGET_CFLAGS += -D_DISABLE_TIDENTS

View file

@ -1,4 +1,4 @@
/* $Id: irql.c,v 1.11 2003/11/04 21:36:22 gvg Exp $
/* $Id: irql.c,v 1.12 2003/11/05 22:37:42 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -201,8 +201,6 @@ HalpLowerIrql(KIRQL NewIrql)
VOID FASTCALL
KfLowerIrql (KIRQL NewIrql)
{
KIRQL OldIrql;
DPRINT("KfLowerIrql(NewIrql %d)\n", NewIrql);
if (NewIrql > CurrentIrql)

View file

@ -1,4 +1,4 @@
/* $Id: spinlock.c,v 1.4 2003/08/12 21:19:50 royce Exp $
/* $Id: spinlock.c,v 1.5 2003/11/05 22:37:42 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -44,8 +44,23 @@ KeAcquireSpinLockRaiseToSynch (
PKSPIN_LOCK SpinLock
)
{
ASSERT_IRQL(SYNCH_LEVEL);
KIRQL OldIrql;
KIRQL NewIrql;
#ifdef MP
NewIrql = IPI_LEVEL - 1;
#else
NewIrql = DISPATCH_LEVEL;
#endif
OldIrql = KeGetCurrentIrql();
if (OldIrql < NewIrql)
{
KeRaiseIrql(NewIrql, &OldIrql);
}
KeAcquireSpinLockAtDpcLevel(SpinLock);
return OldIrql;
}
VOID STDCALL