More cleanups

svn path=/trunk/; revision=2094
This commit is contained in:
Eric Kohl 2001-07-24 18:39:02 +00:00
parent 72a83f69ee
commit 6c6bb5f62e
13 changed files with 76 additions and 123 deletions

View file

@ -1,11 +1,13 @@
# $Id: makefile,v 1.5 2001/07/15 21:19:00 rex Exp $
# $Id: makefile,v 1.6 2001/07/24 18:37:46 ekohl Exp $
#
#
PATH_TO_TOP = ../../..
TARGET=keyboard
TARGET = keyboard
OBJECTS = $(TARGET).o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
OBJECTS = $(TARGET).o $(TARGET).coff
LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
CFLAGS = -D__NTDRIVER__ -O2 -I. -g
@ -14,7 +16,7 @@ all: $(TARGET).sys $(TARGET).sys.unstripped
.phony: all
clean:
- $(RM) $(TARGET).o $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
- $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
.phony: clean
@ -23,12 +25,14 @@ install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS)
$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
WARNINGS_ARE_ERRORS = yes
include ../../../rules.mak
include $(PATH_TO_TOP)/rules.mak

View file

@ -0,0 +1,2 @@
mouclass.coff
mouclass.sys.unstripped

View file

@ -1,20 +1,22 @@
# $Id: makefile,v 1.5 2001/07/15 21:19:00 rex Exp $
# $Id: makefile,v 1.6 2001/07/24 18:38:04 ekohl Exp $
#
#
TARGET = mouclass
PATH_TO_TOP = ../../..
OBJECTS = $(TARGET).o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
OBJECTS = $(TARGET).o $(TARGET).coff
LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
CFLAGS = -D__NTDRIVER__ -O2 -I.
all: $(TARGET).sys
all: $(TARGET).sys $(TARGET).sys.unstripped
.phony: all
clean:
- $(RM) $(TARGET).o $(TARGET).coff junk.tmp base.tmp temp.exp mouclass.sys
- $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
.phony: clean
@ -23,38 +25,13 @@ install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
$(TARGET).sys: $(OBJECTS)
$(CC) \
-specs=../../svc_specs \
-mdll \
-o junk.tmp \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp \
$(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname $(TARGET).sys \
--base-file base.tmp \
--output-exp temp.exp \
--kill-at
- $(RM) base.tmp
$(CC) \
--verbose \
-Wl,--image-base,0x10000 \
-Wl,-e,_DriverEntry@8 \
-Wl,temp.exp \
-specs=../../svc_specs \
-mdll \
-o $(TARGET).sys \
$(OBJECTS)
- $(RM) temp.exp
$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
include ../../../rules.mak
include $(PATH_TO_TOP)/rules.mak

View file

@ -0,0 +1,2 @@
psaux.coff
psaux.sys.unstripped

View file

@ -84,6 +84,9 @@ void controller_wait(void)
int controller_wait_for_input(void)
{
int timeout;
LARGE_INTEGER Millisecond_Timeout;
Millisecond_Timeout.QuadPart = 1;
for(timeout = KEYBOARD_INIT_TIMEOUT; timeout > 0; timeout--)
{
@ -92,7 +95,7 @@ int controller_wait_for_input(void)
if(return_value >= 0) return return_value;
// Sleep for one millisecond
KeDelayExecutionThread (KernelMode, FALSE, 1);
KeDelayExecutionThread (KernelMode, FALSE, &Millisecond_Timeout);
}
DbgPrint("PSAUX: Timed out on waiting for input from controller\n");

View file

@ -1,20 +1,22 @@
# $Id: makefile,v 1.5 2001/07/15 21:19:00 rex Exp $
# $Id: makefile,v 1.6 2001/07/24 18:38:40 ekohl Exp $
#
#
TARGET = psaux
PATH_TO_TOP = ../../..
OBJECTS = $(TARGET).o controller.o mouse.o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
TARGET = psaux
OBJECTS = $(TARGET).o controller.o mouse.o $(TARGET).coff
LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
CFLAGS = -D__NTDRIVER__ -O2 -I.
all: $(TARGET).sys
all: $(TARGET).sys $(TARGET).sys.unstripped
.phony: all
clean:
- $(RM) *.o $(TARGET).coff junk.tmp base.tmp temp.exp psaux.sys
- $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
.phony: clean
@ -23,38 +25,13 @@ install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
$(TARGET).sys: $(OBJECTS)
$(CC) \
-specs=../../svc_specs \
-mdll \
-o junk.tmp \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp \
$(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname $(TARGET).sys \
--base-file base.tmp \
--output-exp temp.exp \
--kill-at
- $(RM) base.tmp
$(CC) \
--verbose \
-Wl,--image-base,0x10000 \
-Wl,-e,_DriverEntry@8 \
-Wl,temp.exp \
-specs=../../svc_specs \
-mdll \
-o $(TARGET).sys \
$(OBJECTS)
- $(RM) temp.exp
$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
include ../../../rules.mak
include $(PATH_TO_TOP)/rules.mak

View file

@ -148,6 +148,9 @@ BOOLEAN detect_ps2_port(void)
{
int loops;
BOOLEAN return_value = FALSE;
LARGE_INTEGER Millisecond_Timeout;
Millisecond_Timeout.QuadPart = 1;
return TRUE; // The rest of this code fails under BOCHs
@ -177,7 +180,7 @@ BOOLEAN detect_ps2_port(void)
break;
}
KeDelayExecutionThread (KernelMode, FALSE, 1);
KeDelayExecutionThread (KernelMode, FALSE, &Millisecond_Timeout);
}
return return_value;

View file

@ -36,7 +36,8 @@ BOOLEAN MouseSynchronizeRoutine(PVOID Context)
return(FALSE);
}
VOID PS2MouseStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
VOID STDCALL
PS2MouseStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
@ -49,7 +50,8 @@ VOID PS2MouseStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
}
}
NTSTATUS PS2MouseDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS STDCALL
PS2MouseDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS Status;
@ -100,7 +102,8 @@ VOID PS2MouseInitializeDataQueue(PVOID Context)
DeviceExtension->MouseInputData = ExAllocatePool(NonPagedPool, sizeof(MOUSE_INPUT_DATA) * MOUSE_BUFFER_SIZE); */
}
NTSTATUS PS2MouseInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS STDCALL
PS2MouseInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);

View file

@ -0,0 +1,2 @@
sermouse.coff
sermouse.sys.unstripped

View file

@ -1,20 +1,22 @@
# $Id: makefile,v 1.5 2001/07/15 21:19:00 rex Exp $
# $Id: makefile,v 1.6 2001/07/24 18:39:02 ekohl Exp $
#
#
TARGET = sermouse
PATH_TO_TOP = ../../..
OBJECTS = $(TARGET).o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
TARGET = sermouse
OBJECTS = $(TARGET).o $(TARGET).coff
LIBS = $(PATH_TO_TOP)/ntoskrnl/ntoskrnl.a
CFLAGS = -D__NTDRIVER__ -O2 -I.
all: $(TARGET).sys
all: $(TARGET).sys $(TARGET).sys.unstripped
.phony: all
clean:
- $(RM) $(TARGET).o $(TARGET).coff junk.tmp base.tmp temp.exp sermouse.sys
- $(RM) *.o *.sym $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).sys.unstripped
.phony: clean
@ -23,38 +25,13 @@ install: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
dist: $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
$(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
$(CP) $(TARGET).sys $(PATH_TO_TOP)/$(DIST_DIR)/drivers/$(TARGET).sys
$(TARGET).sys: $(OBJECTS)
$(CC) \
-specs=../../svc_specs \
-mdll \
-o junk.tmp \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp \
$(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname $(TARGET).sys \
--base-file base.tmp \
--output-exp temp.exp \
--kill-at
- $(RM) base.tmp
$(CC) \
--verbose \
-Wl,--image-base,0x10000 \
-Wl,-e,_DriverEntry@8 \
-Wl,temp.exp \
-specs=../../svc_specs \
-mdll \
-o $(TARGET).sys \
$(OBJECTS)
- $(RM) temp.exp
$(TARGET).sys $(TARGET).sys.unstripped: $(OBJECTS) $(LIBS)
$(TARGET).coff: $(PATH_TO_TOP)/include/reactos/buildno.h $(TARGET).rc
include ../../../rules.mak
include $(PATH_TO_TOP)/rules.mak

View file

@ -2,3 +2,4 @@ base.tmp
junk.tmp
temp.exp
class2.coff
class2.sys.unstripped

View file

@ -2,3 +2,4 @@ base.tmp
junk.tmp
temp.exp
disk.coff
disk.sys.unstripped

View file

@ -2,3 +2,4 @@ base.tmp
junk.tmp
temp.exp
scsiport.coff
scsiport.sys.unstripped