ReactOS  0.4.14-dev-552-g2fad488
ntoskrnl.c File Reference
#include <ntoskrnl.h>
Include dependency graph for ntoskrnl.c:

Go to the source code of this file.

Functions

VOID NTAPI KeInitializeEvent (IN PRKEVENT Event, IN EVENT_TYPE Type, IN BOOLEAN State)
 
VOID FASTCALL KiAcquireSpinLock (IN PKSPIN_LOCK SpinLock)
 
VOID FASTCALL KiReleaseSpinLock (IN PKSPIN_LOCK SpinLock)
 
VOID NTAPI KeSetTimeIncrement (IN ULONG MaxIncrement, IN ULONG MinIncrement)
 
VOID FASTCALL IoAssignDriveLetters (IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
 
NTSTATUS FASTCALL IoSetPartitionInformation (IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
 
NTSTATUS FASTCALL IoWritePartitionTable (IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
 
VOID NTAPI KeStallExecutionProcessor (IN ULONG MicroSeconds)
 

Function Documentation

◆ IoAssignDriveLetters()

VOID FASTCALL IoAssignDriveLetters ( IN struct _LOADER_PARAMETER_BLOCK LoaderBlock,
IN PSTRING  NtDeviceName,
OUT PUCHAR  NtSystemPath,
OUT PSTRING  NtSystemPathString 
)

Definition at line 54 of file ntoskrnl.c.

59 {
60 }

Referenced by HalpAssignDriveLetters(), and IoInitSystem().

◆ IoSetPartitionInformation()

NTSTATUS FASTCALL IoSetPartitionInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN ULONG  SectorSize,
IN ULONG  PartitionNumber,
IN ULONG  PartitionType 
)

Definition at line 64 of file ntoskrnl.c.

69 {
71 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225

Referenced by DiskSetPartitionInformation(), HalpSetPartitionInformation(), IoSetPartitionInformationEx(), and ScsiDiskDeviceControl().

◆ IoWritePartitionTable()

NTSTATUS FASTCALL IoWritePartitionTable ( IN PDEVICE_OBJECT  DeviceObject,
IN ULONG  SectorSize,
IN ULONG  SectorsPerTrack,
IN ULONG  NumberOfHeads,
IN PDRIVE_LAYOUT_INFORMATION  PartitionBuffer 
)

Definition at line 87 of file ntoskrnl.c.

93 {
95 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225

Referenced by FstubWritePartitionTableMBR(), HalpWritePartitionTable(), and ScsiDiskDeviceControl().

◆ KeInitializeEvent()

VOID NTAPI KeInitializeEvent ( IN PRKEVENT  Event,
IN EVENT_TYPE  Type,
IN BOOLEAN  State 
)

Definition at line 22 of file ntoskrnl.c.

26 {
27  memset(Event, 0, sizeof(*Event));
28 }
#define memset(x, y, z)
Definition: compat.h:39

◆ KeSetTimeIncrement()

VOID NTAPI KeSetTimeIncrement ( IN ULONG  MaxIncrement,
IN ULONG  MinIncrement 
)

Definition at line 46 of file ntoskrnl.c.

49 {
50 }

Referenced by HalInitSystem(), and HalpInitializeClock().

◆ KeStallExecutionProcessor()

VOID NTAPI KeStallExecutionProcessor ( IN ULONG  MicroSeconds)

Definition at line 99 of file ntoskrnl.c.

101 {
102 #if defined(_M_IX86) || defined(_M_AMD64)
103  REGS Regs;
104  ULONG usec_this;
105 
106  // Int 15h AH=86h
107  // BIOS - WAIT (AT,PS)
108  //
109  // AH = 86h
110  // CX:DX = interval in microseconds
111  // Return:
112  // CF clear if successful (wait interval elapsed)
113  // CF set on error or AH=83h wait already in progress
114  // AH = status (see #00496)
115 
116  // Note: The resolution of the wait period is 977 microseconds on
117  // many systems because many BIOSes use the 1/1024 second fast
118  // interrupt from the AT real-time clock chip which is available on INT 70;
119  // because newer BIOSes may have much more precise timers available, it is
120  // not possible to use this function accurately for very short delays unless
121  // the precise behavior of the BIOS is known (or found through testing)
122 
123  while (MicroSeconds)
124  {
125  usec_this = MicroSeconds;
126 
127  if (usec_this > 4000000)
128  {
129  usec_this = 4000000;
130  }
131 
132  Regs.b.ah = 0x86;
133  Regs.w.cx = usec_this >> 16;
134  Regs.w.dx = usec_this & 0xffff;
135  Int386(0x15, &Regs, &Regs);
136 
137  MicroSeconds -= usec_this;
138  }
139 #else
140  #error unimplemented
141 #endif
142 }
unsigned short dx
Definition: pcbios.h:102
unsigned short cx
Definition: pcbios.h:101
unsigned char ah
Definition: pcbios.h:120
int __cdecl Int386(int ivec, REGS *in, REGS *out)
BYTEREGS b
Definition: pcbios.h:151
unsigned int ULONG
Definition: retypes.h:1
Definition: pcbios.h:146
WORDREGS w
Definition: pcbios.h:150

Referenced by acpi_system_restore_state(), AcpiOsSleep(), AcpiOsStall(), CallPxe(), CheckLoadAbort(), CloseStreamRoutine(), ConsoleShutdown(), EHCI_FlushAsyncCache(), EHCI_RH_ChirpRootPort(), EHCI_RH_PortResetComplete(), EHCI_RH_SetFeaturePortSuspend(), EHCI_SuspendController(), Get_Byte(), CUSBHardwareDevice::GlobalReset(), HalpReboot(), HDA_FDOStartDevice(), HDA_InitCorbRirbPos(), HDA_ResetController(), HwDelay(), i8042BasicDetect(), i8042DetectMouse(), i8042Flush(), i8042KbdInterruptService(), i8042MouInterruptService(), i8042ReadDataWait(), i8042Write(), InitMPU(), KbdSendCommandToMouse(), KdbpPager(), KdbpPrint(), KdbpReadCommand(), KdpPromptString(), KeBugCheckWithTf(), KeStallExecutionProcessorTest(), KeyboardDeviceWorker(), KeyboardFlushKeyboardQueue(), OHCI_ReadRhDescriptorA(), OHCI_ResetController(), OHCI_RH_GetPortStatus(), OHCI_StartController(), PciStallForPowerChange(), PdoWrite(), PinWavePciState(), PrintCursorHercules(), CCMIAdapter::resetController(), CUSBHardwareDevice::ResetController(), ScsiPortStallExecution(), Send_Byte(), SermouseDeviceWorker(), CUSBDevice::SetDeviceAddress(), SMBusWriteByte(), SpiSendSynchronousSrb(), CUSBHardwareDevice::StartController(), CUSBHardwareDevice::StopController(), StorPortStallExecution(), and UhciRHPortResetComplete().

◆ KiAcquireSpinLock()

◆ KiReleaseSpinLock()