-VOID DbgBreakPoint(VOID);
-ULONG DbgPrint(PCH Format,...);
+VOID STDCALL DbgBreakPoint(VOID);
+VOID STDCALL DbgBreakPointWithStatus (ULONG Status);
+ULONG DbgPrint(PCH Format,...);
#define DBG_GET_SHOW_FACILITY 0x0001
#define DBG_GET_SHOW_SEVERITY 0x0002
WORK_QUEUE_TYPE QueueType
);
VOID
+STDCALL
+ExRaiseAccessViolation (
+ VOID
+ );
+VOID
+STDCALL
+ExRaiseDatatypeMisalignment (
+ VOID
+ );
+VOID
+STDCALL
ExRaiseStatus (
NTSTATUS Status
);
/*
* FUNCTION: Raises a user mode exception
* ARGUMENTS:
- * ExceptionCode = Status code of the exception
+ * ExceptionCode = Status code of the exception
*/
VOID KeRaiseUserException(NTSTATUS ExceptionCode);
+/*
+ * FUNCTION: Enters the kernel debugger
+ * ARGUMENTS:
+ * None
+ */
+VOID
+STDCALL
+KeEnterKernelDebugger (VOID);
+
#endif /* __INCLUDE_DDK_KEFUNCS_H */
-/* $Id: rtl.h,v 1.27 2000/02/21 22:36:00 ekohl Exp $
+/* $Id: rtl.h,v 1.28 2000/03/03 00:38:15 ekohl Exp $
*
*/
PWSTR Path
);
+VOID
+STDCALL
+RtlClearAllBits (
+ IN PRTL_BITMAP BitMapHeader
+ );
+
UINT
STDCALL
RtlCompactHeap (
PCWSTR SourceString
);
+VOID
+STDCALL
+RtlInitializeBitMap (
+ IN OUT PRTL_BITMAP BitMapHeader,
+ IN PULONG BitMapBuffer,
+ IN ULONG SizeOfBitMap
+ );
+
NTSTATUS
STDCALL
RtlInitializeContext (
PLARGE_INTEGER Time
);
+VOID
+STDCALL
+RtlSetAllBits (
+ IN PRTL_BITMAP BitMapHeader
+ );
+
NTSTATUS
STDCALL
RtlSetDaclSecurityDescriptor (
PVOID pmem
);
+#if 0
PWSTR
RtlStrtok (
PUNICODE_STRING _string,
PWSTR _sep,
PWSTR * temp
);
+#endif
VOID
RtlStoreLong (
-/* $Id: brkpoint.c,v 1.1 1999/12/29 17:12:28 ekohl Exp $
+/* $Id: brkpoint.c,v 1.2 2000/03/03 00:39:38 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* FUNCTIONS *****************************************************************/
-VOID DbgBreakPoint(VOID)
+VOID STDCALL DbgBreakPoint(VOID)
{
__asm__("int $3\n\t");
}
-VOID DbgUserBreakPoint(VOID)
+VOID STDCALL DbgUserBreakPoint(VOID)
{
__asm__("int $3\n\t");
}
-; $Id: ntdll.def,v 1.42 2000/02/27 02:05:40 ekohl Exp $
+; $Id: ntdll.def,v 1.43 2000/03/03 00:40:29 ekohl Exp $
;
; ReactOS Operating System
;
EXPORTS
CsrClientCallServer@16
CsrClientConnectToServer@24
-DbgBreakPoint
+DbgBreakPoint@0
DbgPrint
-DbgUserBreakPoint
-NlsAnsiCodePage
-NlsMbCodePageTag
-NlsMbOemCodePageTag
+DbgUserBreakPoint@0
+NlsAnsiCodePage DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
NtAcceptConnectPort@24
NtAccessCheck@32
NtAccessCheckAndAuditAlarm@44
-; $Id: ntdll.edf,v 1.31 2000/02/27 02:05:40 ekohl Exp $
+; $Id: ntdll.edf,v 1.32 2000/03/03 00:40:29 ekohl Exp $
;
; ReactOS Operating System
;
EXPORTS
CsrClientCallServer=CsrClientCallServer@16
CsrClientConnectToServer=CsrClientConnectToServer@24
-DbgBreakPoint
+DbgBreakPoint=DbgBreakPoint@0
DbgPrint
-DbgUserBreakPoint
-NlsAnsiCodePage
-NlsMbCodePageTag
-NlsMbOemCodePageTag
+DbgUserBreakPoint=DbgUserBreakPoint@0
+NlsAnsiCodePage DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
NtAcceptConnectPort=NtAcceptConnectPort@24
NtAccessCheck=NtAccessCheck@32
NtAccessCheckAndAuditAlarm=NtAccessCheckAndAuditAlarm@44
UNIMPLEMENTED;
}
-VOID DbgBreakPoint(VOID)
+VOID STDCALL DbgBreakPoint(VOID)
{
__asm__("int $3\n\t");
}
+VOID STDCALL DbgBreakPointWithStatus(ULONG Status)
+{
+ __asm__("mov %0, %%eax\n\t"
+ "int $3\n\t"
+ ::"m"(Status));
+}
--- /dev/null
+/* $Id: misc.c,v 1.1 2000/03/03 00:45:53 ekohl Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/hal/x86/misc.c
+ * PURPOSE: Miscellaneous hardware functions
+ * PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ddk/ntddk.h>
+
+
+/* FUNCTIONS ****************************************************************/
+
+VOID
+STDCALL
+HalHandleNMI (ULONG Unused)
+{
+ UCHAR ucStatus;
+
+ ucStatus = READ_PORT_UCHAR((PUCHAR) 0x61);
+
+ HalDisplayString ("\n*** Hardware Malfunction\n\n");
+ HalDisplayString ("Call your hardware vendor for support\n\n");
+
+ if (ucStatus & 0x80)
+ HalDisplayString ("NMI: Parity Check / Memory Parity Error\n");
+
+ if (ucStatus & 0x40)
+ HalDisplayString ("NMI: Channel Check / IOCHK\n");
+
+ HalDisplayString ("\n*** The system has halted ***\n");
+ KeEnterKernelDebugger ();
+}
+
+VOID
+STDCALL
+HalProcessorIdle (VOID)
+{
+ __asm__("sti\n\t" \
+ "hlt\n\t");
+}
+
+/* EOF */
\ No newline at end of file
HAL_OBJECTS = hal/x86/head.o hal/x86/irq.o hal/x86/isa.o \
hal/x86/pci.o hal/x86/irqhand.o hal/x86/halinit.o \
- hal/x86/irql.o hal/x86/bios32.o hal/x86/spinlock.o \
+ hal/x86/irql.o hal/x86/bios32.o \
hal/x86/mp.o hal/x86/dma.o hal/x86/bus.o hal/x86/mbr.o \
hal/x86/sysinfo.o hal/x86/time.o hal/x86/beep.o \
- hal/x86/display.o hal/x86/reboot.o hal/x86/kdbg.o hal/x86/portio.o
-
+ hal/x86/display.o hal/x86/reboot.o hal/x86/kdbg.o \
+ hal/x86/portio.o hal/x86/misc.o
-/* $Id: kdebug.c,v 1.6 2000/02/27 02:09:40 ekohl Exp $
+/* $Id: kdebug.c,v 1.7 2000/03/03 00:46:37 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
return KdPortPollByte();
}
+VOID
+STDCALL
+KeEnterKernelDebugger (
+ VOID
+ )
+{
+ HalDisplayString ("\n\n *** Entered kernel debugger ***\n");
+
+ for (;;)
+ __asm__("hlt\n\t");
+}
/* EOF */
-/*
+/* $Id: catch.c,v 1.7 2000/03/03 00:47:06 ekohl Exp $
+ *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/catch.c
/* FUNCTIONS ****************************************************************/
-VOID ExRaiseStatus(NTSTATUS Status)
+VOID
+STDCALL
+ExRaiseAccessViolation (
+ VOID
+ )
{
- DbgPrint("ExRaiseStatus(%x)\n",Status);
- for(;;);
+ ExRaiseStatus (STATUS_ACCESS_VIOLATION);
}
+VOID
+STDCALL
+ExRaiseDatatypeMisalignment (
+ VOID
+ )
+{
+ ExRaiseStatus (STATUS_DATATYPE_MISALIGNMENT);
+}
-NTSTATUS STDCALL NtRaiseException(IN PEXCEPTION_RECORD ExceptionRecord,
- IN PCONTEXT Context,
- IN BOOL IsDebugger OPTIONAL)
+VOID
+STDCALL
+ExRaiseStatus (
+ IN NTSTATUS Status
+ )
{
- UNIMPLEMENTED;
+ DbgPrint("ExRaiseStatus(%x)\n",Status);
+ for(;;);
}
+
+
+NTSTATUS
+STDCALL
+NtRaiseException (
+ IN PEXCEPTION_RECORD ExceptionRecord,
+ IN PCONTEXT Context,
+ IN BOOL IsDebugger OPTIONAL
+ )
+{
+ UNIMPLEMENTED;
+}
+
+/* EOF */
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/hal/x86/spinlock.c
+ * PURPOSE: Implements spinlocks
+ * PROGRAMMER: David Welch (welch@cwcom.net)
+ * UPDATE HISTORY:
+ * 3/6/98: Created
+ */
+
+/*
+ * NOTE: On a uniprocessor machine spinlocks are implemented by raising
+ * the irq level
+ */
+
+/* INCLUDES ****************************************************************/
+
+#include <ddk/ntddk.h>
+
+#include <internal/debug.h>
+
+/* FUNCTIONS ***************************************************************/
+
+BOOLEAN KeSynchronizeExecution(PKINTERRUPT Interrupt,
+ PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
+ PVOID SynchronizeContext)
+/*
+ * FUNCTION: Synchronizes the execution of a given routine with the ISR
+ * of a given interrupt object
+ * ARGUMENTS:
+ * Interrupt = Interrupt object to synchronize with
+ * SynchronizeRoutine = Routine to call whose execution is
+ * synchronized with the ISR
+ * SynchronizeContext = Parameter to pass to the synchronized routine
+ * RETURNS: TRUE if the operation succeeded
+ */
+{
+ KIRQL oldlvl;
+ BOOLEAN ret;
+
+ KeRaiseIrql(Interrupt->SynchLevel,&oldlvl);
+ KeAcquireSpinLockAtDpcLevel(Interrupt->IrqLock);
+
+ ret = SynchronizeRoutine(SynchronizeContext);
+
+ KeReleaseSpinLockFromDpcLevel(Interrupt->IrqLock);
+ KeLowerIrql(oldlvl);
+
+ return(ret);
+}
+
+VOID KeInitializeSpinLock(PKSPIN_LOCK SpinLock)
+/*
+ * FUNCTION: Initalizes a spinlock
+ * ARGUMENTS:
+ * SpinLock = Caller supplied storage for the spinlock
+ */
+{
+ SpinLock->Lock = 0;
+}
+
+VOID KeAcquireSpinLockAtDpcLevel(PKSPIN_LOCK SpinLock)
+/*
+ * FUNCTION: Acquires a spinlock when the caller is already running at
+ * dispatch level
+ * ARGUMENTS:
+ * SpinLock = Spinlock to acquire
+ */
+{
+ ULONG i;
+
+ while ((i = InterlockedExchange(&SpinLock->Lock, 1)) == 1)
+ {
+ DbgPrint("Spinning on spinlock %x current value %x\n", SpinLock, i);
+ KeBugCheck(0);
+ }
+}
+
+VOID KeReleaseSpinLockFromDpcLevel(PKSPIN_LOCK SpinLock)
+/*
+ * FUNCTION: Releases a spinlock when the caller was running at dispatch
+ * level before acquiring it
+ * ARGUMENTS:
+ * SpinLock = Spinlock to release
+ */
+{
+ if (SpinLock->Lock != 1)
+ {
+ DbgPrint("Releasing unacquired spinlock %x\n", SpinLock);
+ KeBugCheck(0);
+ }
+ (void)InterlockedExchange(&SpinLock->Lock, 0);
+}
+
+VOID KeAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL OldIrql)
+/*
+ * FUNCTION: Acquires a spinlock
+ * ARGUMENTS:
+ * SpinLock = Spinlock to acquire
+ * OldIrql (OUT) = Caller supplied storage for the previous irql
+ */
+{
+ KeRaiseIrql(DISPATCH_LEVEL,OldIrql);
+ KeAcquireSpinLockAtDpcLevel(SpinLock);
+}
+
+VOID KeReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL NewIrql)
+/*
+ * FUNCTION: Releases a spinlock
+ * ARGUMENTS:
+ * SpinLock = Spinlock to release
+ * NewIrql = Irql level before acquiring the spinlock
+ */
+{
+ KeReleaseSpinLockFromDpcLevel(SpinLock);
+ KeLowerIrql(NewIrql);
+}
+
-# $Id: makefile_rex,v 1.55 2000/03/01 22:52:27 ea Exp $
+# $Id: makefile_rex,v 1.56 2000/03/03 00:43:28 ekohl Exp $
#
# ReactOS Operating System
#
BASE_CFLAGS = -I../include -D__NTOSKRNL__
+
all: objects $(TARGET).exe
#
rtl/memmove.o rtl/memset.o rtl/nls.o rtl/regio.o \
rtl/return.o rtl/slist.o rtl/sprintf.o rtl/swprintf.o \
rtl/stdlib.o rtl/string.o rtl/time.o rtl/unalign.o \
- rtl/unicode.o rtl/wstring.o
+ rtl/unicode.o rtl/wstring.o rtl/bitmap.o
KE_OBJECTS = ke/main.o ke/timer.o ke/error.o ke/catch.o \
ke/dpc.o ke/wait.o ke/kqueue.o ke/dispatch.o \
ke/sem.o ke/critical.o ke/event.o ke/apc.o ke/bug.o \
- ke/mutex.o ke/kernel.o ke/ldt.o \
+ ke/mutex.o ke/kernel.o ke/ldt.o ke/spinlock.o\
ke/process.o ke/gdt.o ke/idt.o ke/udelay.o
KE_I386_OBJECTS = ke/i386/thread.o ke/i386/usercall.o ke/i386/exp.o
objects/io.o objects/ob.o objects/ps.o objects/ex.o \
objects/se.o objects/cm.o objects/dbg.o objects/nt.o \
objects/cc.o objects/kd.o objects/ldr.o objects/fs.o \
- objects/po.o objects/nls.o \
+ objects/po.o objects/nls.o \
$(TARGET).coff
ifeq ($(DOSCLI),yes)
CLEAN_FILES = objects\*.o cc\*.o cm\*.o dbg\*.o ex\*.o hal\x86\*.o io\*.o \
ke\*.o ldr\*.o mm\*.o nt\*.o ob\*.o ps\*.o rtl\*.o se\*.o \
- ke\i386\*.o mm\i386\*.o fs\*.o po\*.o nls\*.o \
+ ke\i386\*.o mm\i386\*.o fs\*.o po\*.o nls\*.o \
kd\*.o utils\export\export.exe $(TARGET).o $(TARGET).a junk.tmp \
base.tmp temp.exp $(TARGET).exe $(TARGET).sym $(TARGET).coff
else
CLEAN_FILES = objects/*.o cc/*.o cm/*.o dbg/*.o ex/*.o hal/x86/*.o io/*.o \
ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o rtl/*.o se/*.o \
- ke/i386/*.o mm/i386/*.o fs/*.o po/*.o nls/*.o \
+ ke/i386/*.o mm/i386/*.o fs/*.o po/*.o nls/*.o \
kd/*.o utils/export/export $(TARGET).o $(TARGET).a junk.tmp \
base.tmp temp.exp $(TARGET).exe $(TARGET).sym $(TARGET).coff
endif
+
$(TARGET).exe: $(OBJECTS) $(TARGET).def
$(LD) \
-r $(OBJECTS) \
-; $Id: ntoskrnl.def,v 1.48 2000/03/01 22:52:27 ea Exp $
+; $Id: ntoskrnl.def,v 1.49 2000/03/03 00:43:28 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
CcRequestCachePage@20
CcReleaseCachePage@12
CcReleaseFileCache@8
+DbgBreakPoint@0
+DbgBreakPointWithStatus@4
DbgPrint
ExAcquireResourceExclusive
ExAcquireResourceExclusiveLite
ExLocalTimeToSystemTime
ExQueryDepthSListHead
ExQueueWorkItem
-ExRaiseStatus
+ExRaiseAccessViolation@0
+ExRaiseDatatypeMisalignment@0
+ExRaiseStatus@4
ExReinitializeResourceLite
ExReleaseFastMutexUnsafe
ExReleaseResource
KeBugCheckEx
KeClearEvent
KeDelayExecutionThread@12
+KeEnterKernelDebugger@0
KeFlushIoBuffers
KeGetPreviousMode
KeInitializeDpc
KeWaitForSingleObject
MmGetSystemAddressForMdl
MmMapIoSpace
-NlsMbCodePageTag
-NlsMbOemCodePageTag
+NlsAnsiCodePage DATA
+NlsLeadByteInfo DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
+NlsOemLeadByteInfo DATA
NtAddAtom@8
NtAdjustPrivilegesToken@24
NtAllocateLocallyUniqueId@4
READ_REGISTER_BUFFER_UCHAR
READ_REGISTER_BUFFER_ULONG
READ_REGISTER_BUFFER_USHORT
-;RtlAbsoluteToSelfRelativeSD
+RtlAbsoluteToSelfRelativeSD@12
;RtlAddAccessAllowedAce
;RtlAddAce
;RtlAddAtomToAtomTable
;RtlCaptureStackBackTrace
RtlCharToInteger@12
;RtlCheckRegistryKey
-;RtlClearAllBits
-;RtlClearBits
+RtlClearAllBits@4
+RtlClearBits@12
RtlCompareMemory@12
RtlCompareMemoryUlong@12
RtlCompareString@12
;RtlCreateAtomTable
;RtlCreateHeap
;RtlCreateRegistryKey
-;RtlCreateSecurityDescriptor
+RtlCreateSecurityDescriptor@8
RtlCreateUnicodeString@8
;RtlCustomCPToUnicodeN
;RtlDecompressBuffer
;RtlGenerate8dot3Name
;RtlGetCallersAddress
;RtlGetCompressionWorkSpaceSize
-;RtlGetDaclSecurityDescriptor
+RtlGetDaclSecurityDescriptor@16
RtlGetDefaultCodePage@8
;RtlGetElementGenericTable
-;RtlGetGroupSecurityDescriptor
-;RtlGetOwnerSecurityDescriptor
-;RtlImageNtHeader@4
+RtlGetGroupSecurityDescriptor@12
+RtlGetOwnerSecurityDescriptor@12
+;RtlImageNtHeader
RtlInitAnsiString@8
;RtlInitCodePageTable
RtlInitString@8
RtlInitUnicodeString@8
-;RtlInitializeBitmap
+RtlInitializeBitMap@12
;RtlInitializeGenericTable
RtlInitializeSid@12
;RtlInitializeUnicodePrefix
RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract@16
RtlLengthRequiredSid@4
-;RtlLengthRequiredSecurityDescriptor
+RtlLengthSecurityDescriptor@4
RtlLengthSid@4
;RtlLookupAtomInAtomTable
;RtlLookupElementGenericTable
;RtlNumberGenericTableElements
;RtlNumberOfClearBits
;RtlNumberOfSetBits
-;RtlOemStringToCountedUnicodeString
+RtlOemStringToCountedUnicodeString@12
RtlOemStringToUnicodeSize@4
RtlOemStringToUnicodeString@12
RtlOemToUnicodeN@20
;RtlPinAtomInAtomTable
;RtlPrefixString
;RtlPrefixUnicodeString
-;RtlQueryAtominAtomTable
+;RtlQueryAtomInAtomTable
;RtlQueryRegistryValues
;RtlQueryTimeZoneInformation
;RtlRaiseException
;RtlReserveChunk
RtlSecondsSince1970ToTime@8
RtlSecondsSince1980ToTime@8
-;RtlSetAllBits
-;RtlSetBits
-;RtlSetDaclSecurityDescriptor
-;RtlSetGroupSecurityDescriptor
-;RtlSetOwnerSecurityDescriptor
+RtlSetAllBits@4
+RtlSetBits@12
+RtlSetDaclSecurityDescriptor@16
+RtlSetGroupSecurityDescriptor@12
+RtlSetOwnerSecurityDescriptor@12
;RtlSetSaclSecurityDescriptor
;RtlSetTimeZoneInformation
;RtlSplay
RtlTimeToTimeFields@8
RtlUnicodeStringToAnsiSize@4
RtlUnicodeStringToAnsiString@12
-;RtlUnicodeStringToCountedOemString
+RtlUnicodeStringToCountedOemString@12
RtlUnicodeStringToInteger@12
RtlUnicodeStringToOemSize@4
RtlUnicodeStringToOemString@12
RtlUpcaseUnicodeChar@4
RtlUpcaseUnicodeString@12
RtlUpcaseUnicodeStringToAnsiString@12
-;RtlUpcaseUnicodeStringToCountedOemString
+RtlUpcaseUnicodeStringToCountedOemString@12
RtlUpcaseUnicodeStringToOemString@12
;RtlUpcaseUnicodeToCustomCPN
RtlUpcaseUnicodeToMultiByteN@20
RtlUpcaseUnicodeToOemN@20
RtlUpperChar@4
RtlUpperString@8
-;RtlValidSecurityDescriptor
+RtlValidSecurityDescriptor@4
RtlValidSid@4
;RtlWriteRegistryValue
;RtlZeroHeap
; exports from hal.dll
;
;
-;ExAcquireFastMutex
+ExAcquireFastMutex
ExReleaseFastMutex
ExTryToAcquireFastMutex
HalAcquireDisplayOwnership
HalGetBusDataByOffset
;HalGetEnvironmentVariable
HalGetInterruptVector
-;HalHandleNMI
+HalHandleNMI@4
HalInitSystem
;HalInitializeProcessor
HalMakeBeep
-;HalProcessorIdle
+HalProcessorIdle@0
HalQueryDisplayParameters
HalQueryRealTimeClock
;HalReadDmaCounter
-; $Id: ntoskrnl.edf,v 1.35 2000/03/01 22:52:27 ea Exp $
+; $Id: ntoskrnl.edf,v 1.36 2000/03/03 00:43:29 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
CcRequestCachePage=CcRequestCachePage@20
CcReleaseCachePage=CcReleaseCachePage@12
CcReleaseFileCache=CcReleaseFileCache@8
+DbgBreakPoint=DbgBreakPoint@0
+DbgBreakPointWithStatus=DbgBreakPointWithStatus@4
DbgPrint
ExAcquireResourceExclusive
ExAcquireResourceExclusiveLite
ExLocalTimeToSystemTime
ExQueryDepthSListHead
ExQueueWorkItem
-ExRaiseStatus
+ExRaiseAccessViolation=ExRaiseAccessViolation@0
+ExRaiseDatatypeMisalignment=ExRaiseDatatypeMisalignment@0
+ExRaiseStatus=ExRaiseStatus@4
ExReinitializeResourceLite
ExReleaseFastMutexUnsafe
ExReleaseResource
KeBugCheckEx
KeClearEvent
KeDelayExecutionThread=KeDelayExecutionThread@12
+KeEnterKernelDebugger=KeEnterKernelDebugger@0
KeFlushIoBuffers
KeGetPreviousMode
KeInitializeDpc
KeWaitForSingleObject
MmGetSystemAddressForMdl
MmMapIoSpace
-NlsMbCodePageTag
-NlsMbOemCodePageTag
+NlsAnsiCodePage DATA
+NlsLeadByteInfo DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
+NlsOemLeadByteInfo DATA
NtAddAtom=NtAddAtom@8
NtAdjustPrivilegesToken=NtAdjustPrivilegesToken@24
NtAllocateLocallyUniqueId=NtAllocateLocallyUniqueId@4
READ_REGISTER_BUFFER_UCHAR
READ_REGISTER_BUFFER_ULONG
READ_REGISTER_BUFFER_USHORT
+RtlAbsoluteToSelfRelativeSD=RtlAbsoluteToSelfRelativeSD@12
RtlAnsiCharToUnicodeChar=RtlAnsiCharToUnicodeChar@4
RtlAnsiStringToUnicodeSize=RtlAnsiStringToUnicodeSize@4
RtlAnsiStringToUnicodeString=RtlAnsiStringToUnicodeString@12
RtlAppendUnicodeStringToString=RtlAppendUnicodeStringToString@8
RtlAppendUnicodeToString=RtlAppendUnicodeToString@8
RtlCharToInteger=RtlCharToInteger@12
+RtlClearAllBits=RtlClearAllBits@4
+RtlClearBits=RtlClearBits@12
RtlCompareMemory=RtlCompareMemory@12
RtlCompareMemoryUlong=RtlCompareMemoryUlong@12
RtlCompareString=RtlCompareString@12
RtlCopySid=RtlCopySid@12
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
+RtlCreateSecurityDescriptor=RtlCreateSecurityDescriptor@8
RtlCreateUnicodeString=RtlCreateUnicodeString@8
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
RtlEnlargedIntegerMultiply=RtlEnlargedIntegerMultiply@8
RtlFreeAnsiString=RtlFreeAnsiString@4
RtlFreeOemString=RtlFreeOemString@4
RtlFreeUnicodeString=RtlFreeUnicodeString@4
+RtlGetDaclSecurityDescriptor=RtlGetDaclSecurityDescriptor@16
RtlGetDefaultCodePage=RtlGetDefaultCodePage@8
-;RtlImageNtHeader=RtlImageNtHeader@4
+RtlGetGroupSecurityDescriptor=RtlGetGroupSecurityDescriptor@12
+RtlGetOwnerSecurityDescriptor=RtlGetOwnerSecurityDescriptor@12
RtlInitAnsiString=RtlInitAnsiString@8
RtlInitString=RtlInitString@8
RtlInitUnicodeString=RtlInitUnicodeString@8
+RtlInitializeBitMap=RtlInitializeBitMap@12
RtlInitializeSid=RtlInitializeSid@12
RtlIntegerToChar=RtlIntegerToChar@16
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
RtlLengthRequiredSid=RtlLengthRequiredSid@4
+RtlLengthSecurityDescriptor=RtlLengthSecurityDescriptor@4
RtlLengthSid=RtlLengthSid@4
RtlMoveMemory=RtlMoveMemory@12
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
+RtlOemStringToCountedUnicodeString=RtlOemStringToCountedUnicodeString@12
RtlOemStringToUnicodeSize=RtlOemStringToUnicodeSize@4
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
RtlSecondsSince1970ToTime=RtlSecondsSince1970ToTime@8
RtlSecondsSince1980ToTime=RtlSecondsSince1980ToTime@8
+RtlSetAllBits=RtlSetAllBits@4
+RtlSetBits=RtlSetBits@12
+RtlSetDaclSecurityDescriptor=RtlSetDaclSecurityDescriptor@16
+RtlSetGroupSecurityDescriptor=RtlSetGroupSecurityDescriptor@12
+RtlSetOwnerSecurityDescriptor=RtlSetOwnerSecurityDescriptor@12
RtlSubAuthorityCountSid=RtlSubAuthorityCountSid@4
RtlSubAuthoritySid=RtlSubAuthoritySid@8
RtlTimeFieldsToTime=RtlTimeFieldsToTime@8
RtlTimeToTimeFields=RtlTimeToTimeFields@8
RtlUnicodeStringToAnsiSize=RtlUnicodeStringToAnsiSize@4
RtlUnicodeStringToAnsiString=RtlUnicodeStringToAnsiString@12
+RtlUnicodeStringToCountedOemString=RtlUnicodeStringToCountedOemString@12
RtlUnicodeStringToInteger=RtlUnicodeStringToInteger@12
RtlUnicodeStringToOemSize=RtlUnicodeStringToOemSize@4
RtlUnicodeStringToOemString=RtlUnicodeStringToOemString@12
RtlUpcaseUnicodeChar=RtlUpcaseUnicodeChar@4
RtlUpcaseUnicodeString=RtlUpcaseUnicodeString@12
RtlUpcaseUnicodeStringToAnsiString=RtlUpcaseUnicodeStringToAnsiString@12
+RtlUpcaseUnicodeStringToCountedOemString=RtlUpcaseUnicodeStringToCountedOemString@12
RtlUpcaseUnicodeStringToOemString=RtlUpcaseUnicodeStringToOemString@12
RtlUpcaseUnicodeToMultiByteN=RtlUpcaseUnicodeToMultiByteN@20
RtlUpcaseUnicodeToOemN=RtlUpcaseUnicodeToOemN@20
RtlUpperChar=RtlUpperChar@4
RtlUpperString=RtlUpperString@8
+RtlValidSecurityDescriptor=RtlValidSecurityDescriptor@4
RtlValidSid=RtlValidSid@4
RtlZeroMemory=RtlZeroMemory@8
RtlxAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize@4
; exports from hal.dll
;
;
-;ExAcquireFastMutex
+ExAcquireFastMutex
ExReleaseFastMutex
ExTryToAcquireFastMutex
HalAcquireDisplayOwnership
HalGetBusDataByOffset
;HalGetEnvironmentVariable
HalGetInterruptVector
-;HalHandleNMI
+HalHandleNMI=HalHandleNMI@4
HalInitSystem
;HalInitializeProcessor
HalMakeBeep
-;HalProcessorIdle
+HalProcessorIdle=HalProcessorIdle@0
HalQueryDisplayParameters
HalQueryRealTimeClock
;HalReadDmaCounter
--- /dev/null
+/* $Id: bitmap.c,v 1.1 2000/03/03 00:48:50 ekohl Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/rtl/bitmap.c
+ * PURPOSE: Bitmap functions
+ * UPDATE HISTORY:
+ * 20/08/99 Created by Eric Kohl
+ */
+
+#include <ddk/ntddk.h>
+
+
+#define ALIGN(x,align) (((x)+(align)-1) / (align))
+
+
+VOID
+STDCALL
+RtlInitializeBitMap (
+ PRTL_BITMAP BitMapHeader,
+ PULONG BitMapBuffer,
+ ULONG SizeOfBitMap
+ )
+{
+ BitMapHeader->SizeOfBitMap = SizeOfBitMap;
+ BitMapHeader->Buffer = BitMapBuffer;
+}
+
+
+VOID
+STDCALL
+RtlClearAllBits (
+ IN OUT PRTL_BITMAP BitMapHeader
+ )
+{
+ memset (BitMapHeader->Buffer,
+ 0x00,
+ ALIGN(BitMapHeader->SizeOfBitMap, 8));
+}
+
+
+VOID
+STDCALL
+RtlClearBits (
+ PRTL_BITMAP BitMapHeader,
+ ULONG StartingIndex,
+ ULONG NumberToClear
+ )
+{
+ ULONG Size = BitMapHeader->SizeOfBitMap;
+ ULONG n;
+ ULONG shift;
+ PCHAR p;
+
+ if (StartingIndex >= Size || NumberToClear == 0)
+ return;
+
+ if (StartingIndex + NumberToClear > Size)
+ NumberToClear = Size - StartingIndex;
+
+ p = (PCHAR)(BitMapHeader->Buffer + (StartingIndex / 8));
+ while (NumberToClear)
+ {
+ /* bit shift in current byte */
+ shift = StartingIndex & 7;
+
+ /* number of bits to change in current byte */
+ n = (NumberToClear > 8 - shift ) ? 8 - shift : NumberToClear;
+
+ /* adjust byte */
+ *p++ &= ~(~(0xFF << n) << shift);
+ NumberToClear -= n;
+ StartingIndex += n;
+ }
+}
+
+
+VOID
+STDCALL
+RtlSetAllBits (
+ IN OUT PRTL_BITMAP BitMapHeader
+ )
+{
+ memset (BitMapHeader->Buffer,
+ 0xFF,
+ ALIGN(BitMapHeader->SizeOfBitMap, 8));
+}
+
+VOID
+STDCALL
+RtlSetBits (
+ PRTL_BITMAP BitMapHeader,
+ ULONG StartingIndex,
+ ULONG NumberToSet
+ )
+{
+ ULONG Size = BitMapHeader->SizeOfBitMap;
+ ULONG n;
+ ULONG shift;
+ PCHAR p;
+
+ if (StartingIndex >= Size || NumberToSet == 0)
+ return;
+
+ if (StartingIndex + NumberToSet > Size)
+ NumberToSet = Size - StartingIndex;
+
+ p = (PCHAR)BitMapHeader->Buffer + (StartingIndex / 8);
+ while (NumberToSet)
+ {
+ /* bit shift in current byte */
+ shift = StartingIndex & 7;
+
+ /* number of bits to change in current byte */
+ n = (NumberToSet > 8 - shift) ? 8 - shift : NumberToSet;
+
+ /* adjust byte */
+ *p++ |= ~( 0xFF << n ) << shift;
+ NumberToSet -= n;
+ StartingIndex += n;
+ }
+}
+
+
+/* EOF */
-/* $Id: nls.c,v 1.2 1999/11/20 21:45:20 ekohl Exp $
+/* $Id: nls.c,v 1.3 2000/03/03 00:48:50 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* FUNCTIONS *****************************************************************/
+/*
+ * RtlCustomCPToUnicodeN
+ */
+
+
VOID
STDCALL
RtlGetDefaultCodePage (
NTSTATUS
STDCALL
-RtlOemToUnicodeN(PWCHAR UnicodeString,
- ULONG UnicodeSize,
- PULONG ResultSize,
- PCHAR OemString,
- ULONG OemSize)
+RtlOemToUnicodeN (
+ PWCHAR UnicodeString,
+ ULONG UnicodeSize,
+ PULONG ResultSize,
+ PCHAR OemString,
+ ULONG OemSize)
{
ULONG Size = 0;
ULONG i;
}
+/*
+ * RtlUnicodeToCustomCPN
+ */
+
+
NTSTATUS
STDCALL
-RtlUnicodeToMultiByteN(PCHAR MbString,
- ULONG MbSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize)
+RtlUnicodeToMultiByteN (
+ PCHAR MbString,
+ ULONG MbSize,
+ PULONG ResultSize,
+ PWCHAR UnicodeString,
+ ULONG UnicodeSize)
{
ULONG Size = 0;
ULONG i;
NTSTATUS
STDCALL
-RtlUnicodeToMultiByteSize(PULONG MbSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize)
+RtlUnicodeToMultiByteSize (
+ PULONG MbSize,
+ PWCHAR UnicodeString,
+ ULONG UnicodeSize)
{
if (NlsMbCodePageTag == FALSE)
{
NTSTATUS
STDCALL
-RtlUnicodeToOemN(PCHAR OemString,
- ULONG OemSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize)
+RtlUnicodeToOemN (
+ PCHAR OemString,
+ ULONG OemSize,
+ PULONG ResultSize,
+ PWCHAR UnicodeString,
+ ULONG UnicodeSize)
{
ULONG Size = 0;
ULONG i;
}
+/*
+ * RtlUpcaseUnicodeToCustomCPN
+ */
+
+
NTSTATUS
STDCALL
RtlUpcaseUnicodeToMultiByteN (
return STATUS_SUCCESS;
}
-
/* EOF */
-/* $Id: unicode.c,v 1.13 2000/02/19 19:31:18 ekohl Exp $
+/* $Id: unicode.c,v 1.14 2000/03/03 00:48:50 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
}
-/*
-RtlCustomCPToUnicodeN
-*/
-
-
NTSTATUS
STDCALL
RtlDowncaseUnicodeString (
}
-/*
-RtlEraseUnicodeString
-*/
-
-
VOID
STDCALL
RtlFreeAnsiString (
}
-/*
-RtlOemStringToCountedUnicodeString
-*/
+NTSTATUS
+STDCALL
+RtlOemStringToCountedUnicodeString (
+ IN OUT PUNICODE_STRING DestinationString,
+ IN POEM_STRING SourceString,
+ IN BOOLEAN AllocateDestinationString
+ )
+{
+ NTSTATUS Status;
+ ULONG Length;
+
+ if (NlsMbCodePageTag == TRUE)
+ Length = RtlAnsiStringToUnicodeSize (SourceString);
+ else
+ Length = SourceString->Length * sizeof(WCHAR);
+
+ if (Length > 65535)
+ return STATUS_INVALID_PARAMETER_2;
+
+ if (AllocateDestinationString == TRUE)
+ {
+ DestinationString->MaximumLength = Length + sizeof(WCHAR);
+ DestinationString->Buffer =
+ ExAllocatePool (NonPagedPool,
+ DestinationString->MaximumLength);
+ if (DestinationString->Buffer == NULL)
+ return STATUS_NO_MEMORY;
+ }
+ else
+ {
+ if (Length > DestinationString->MaximumLength)
+ return STATUS_BUFFER_TOO_SMALL;
+ }
+ DestinationString->Length = Length;
+
+ RtlZeroMemory (DestinationString->Buffer,
+ DestinationString->Length);
+
+ Status = RtlOemToUnicodeN (DestinationString->Buffer,
+ DestinationString->Length,
+ NULL,
+ SourceString->Buffer,
+ SourceString->Length);
+ if (!NT_SUCCESS(Status))
+ {
+ if (AllocateDestinationString)
+ ExFreePool (DestinationString->Buffer);
+
+ return Status;
+ }
+
+ DestinationString->Buffer[Length / sizeof(WCHAR)] = 0;
+
+ return STATUS_SUCCESS;
+}
ULONG
}
-/*
-RtlUnicodeStringToCountedOemString
-*/
+NTSTATUS
+STDCALL
+RtlUnicodeStringToCountedOemString (
+ IN OUT POEM_STRING DestinationString,
+ IN PUNICODE_STRING SourceString,
+ IN BOOLEAN AllocateDestinationString
+ )
+{
+ NTSTATUS Status;
+ ULONG Length;
+ ULONG Size;
+
+ if (NlsMbOemCodePageTag == TRUE)
+ Length = RtlUnicodeStringToAnsiSize (SourceString) + 1;
+ else
+ Length = SourceString->Length / sizeof(WCHAR) + 1;
+
+ if (Length > 0x0000FFFF)
+ return STATUS_INVALID_PARAMETER_2;
+
+ DestinationString->Length = (WORD)(Length - 1);
+
+ if (AllocateDestinationString)
+ {
+ DestinationString->Buffer = ExAllocatePool (NonPagedPool,
+ Length);
+
+ if (DestinationString->Buffer == NULL)
+ return STATUS_NO_MEMORY;
+
+ RtlZeroMemory (DestinationString->Buffer,
+ Length);
+ DestinationString->MaximumLength = (WORD)Length;
+ }
+ else
+ {
+ if (Length > DestinationString->MaximumLength)
+ {
+ if (DestinationString->MaximumLength == 0)
+ return STATUS_BUFFER_OVERFLOW;
+ DestinationString->Length =
+ DestinationString->MaximumLength - 1;
+ }
+ }
+
+ Status = RtlUnicodeToOemN (DestinationString->Buffer,
+ DestinationString->Length,
+ &Size,
+ SourceString->Buffer,
+ SourceString->Length);
+ if (!NT_SUCCESS(Status))
+ {
+ if (AllocateDestinationString)
+ ExFreePool (DestinationString->Buffer);
+
+ return Status;
+ }
+
+ DestinationString->Buffer[Size] = 0;
+
+ return STATUS_SUCCESS;
+}
NTSTATUS
}
-/*
-RtlUpcaseUnicodeStringToCountedOemString
-*/
+NTSTATUS
+STDCALL
+RtlUpcaseUnicodeStringToCountedOemString (
+ IN OUT POEM_STRING DestinationString,
+ IN PUNICODE_STRING SourceString,
+ IN BOOLEAN AllocateDestinationString
+ )
+{
+ NTSTATUS Status;
+ ULONG Length;
+ ULONG Size;
+
+ if (NlsMbCodePageTag == TRUE)
+ Length = RtlUnicodeStringToAnsiSize (SourceString) + 1;
+ else
+ Length = SourceString->Length / sizeof(WCHAR) + 1;
+
+ if (Length > 0x0000FFFF)
+ return STATUS_INVALID_PARAMETER_2;
+
+ DestinationString->Length = (WORD)(Length - 1);
+
+ if (AllocateDestinationString == TRUE)
+ {
+ DestinationString->Buffer = ExAllocatePool (NonPagedPool,
+ Length);
+
+ if (DestinationString->Buffer == NULL)
+ return STATUS_NO_MEMORY;
+
+ RtlZeroMemory (DestinationString->Buffer,
+ Length);
+ DestinationString->MaximumLength = (WORD)Length;
+ }
+ else
+ {
+ if (Length > DestinationString->MaximumLength)
+ {
+ if (DestinationString->MaximumLength == 0)
+ return STATUS_BUFFER_OVERFLOW;
+ DestinationString->Length =
+ DestinationString->MaximumLength - 1;
+ }
+ }
+
+ Status = RtlUpcaseUnicodeToOemN (DestinationString->Buffer,
+ DestinationString->Length,
+ &Size,
+ SourceString->Buffer,
+ SourceString->Length);
+ if (!NT_SUCCESS(Status))
+ {
+ if (AllocateDestinationString)
+ ExFreePool (DestinationString->Buffer);
+
+ return Status;
+ }
+
+ DestinationString->Buffer[Size] = 0;
+
+ return STATUS_SUCCESS;
+}
NTSTATUS
}
-/*
-RtlUpcaseUnicodeToCustomCP
-*/
-
-
CHAR
STDCALL
RtlUpperChar (