mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 18:02:55 +00:00
[FORMATTING] - Fix STDCALL->NTAPI and some other commenting/formatting issues.
[AUDIT] - File doesn't even have a function over 3 lines long, no reason to lock it. svn path=/trunk/; revision=22735
This commit is contained in:
parent
c31f4054ec
commit
7a5dbe8152
|
@ -22,30 +22,34 @@ KSPIN_LOCK CancelSpinLock;
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
NTAPI
|
||||||
IoAcquireCancelSpinLock(PKIRQL Irql)
|
IoAcquireCancelSpinLock(PKIRQL Irql)
|
||||||
{
|
{
|
||||||
KeAcquireSpinLock(&CancelSpinLock,Irql);
|
/* Just acquire the internal lock */
|
||||||
|
KeAcquireSpinLock(&CancelSpinLock,Irql);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
PVOID
|
PVOID
|
||||||
STDCALL
|
NTAPI
|
||||||
IoGetInitialStack(VOID)
|
IoGetInitialStack(VOID)
|
||||||
{
|
{
|
||||||
return(PsGetCurrentThread()->Tcb.InitialStack);
|
/* Return the initial stack from the TCB */
|
||||||
|
return PsGetCurrentThread()->Tcb.InitialStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
NTAPI
|
||||||
IoGetStackLimits(OUT PULONG LowLimit,
|
IoGetStackLimits(OUT PULONG LowLimit,
|
||||||
OUT PULONG HighLimit)
|
OUT PULONG HighLimit)
|
||||||
{
|
{
|
||||||
|
/* Return the limits from the TEB... this is wrong! */
|
||||||
|
DPRINT1("FIXME: IoGetStackLimits returning B*LLSHIT!\n");
|
||||||
*LowLimit = (ULONG)NtCurrentTeb()->Tib.StackLimit;
|
*LowLimit = (ULONG)NtCurrentTeb()->Tib.StackLimit;
|
||||||
*HighLimit = (ULONG)NtCurrentTeb()->Tib.StackBase;
|
*HighLimit = (ULONG)NtCurrentTeb()->Tib.StackBase;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +58,7 @@ IoGetStackLimits(OUT PULONG LowLimit,
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
STDCALL
|
NTAPI
|
||||||
IoIsSystemThread(IN PETHREAD Thread)
|
IoIsSystemThread(IN PETHREAD Thread)
|
||||||
{
|
{
|
||||||
/* Call the Ps Function */
|
/* Call the Ps Function */
|
||||||
|
@ -64,96 +68,93 @@ IoIsSystemThread(IN PETHREAD Thread)
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOLEAN STDCALL
|
BOOLEAN
|
||||||
|
NTAPI
|
||||||
IoIsWdmVersionAvailable(IN UCHAR MajorVersion,
|
IoIsWdmVersionAvailable(IN UCHAR MajorVersion,
|
||||||
IN UCHAR MinorVersion)
|
IN UCHAR MinorVersion)
|
||||||
{
|
{
|
||||||
/* MinorVersion = 0x20 : WinXP
|
/* Return support for WDM 1.10 (Windows 2000) */
|
||||||
0x10 : Win2k
|
if (MajorVersion <= 1 && MinorVersion <= 0x10) return TRUE;
|
||||||
0x5 : WinMe
|
return FALSE;
|
||||||
<0x5 : Win98
|
|
||||||
|
|
||||||
We report Win2k now
|
|
||||||
*/
|
|
||||||
if (MajorVersion <= 1 && MinorVersion <= 0x10)
|
|
||||||
return TRUE;
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
NTAPI
|
||||||
IoReleaseCancelSpinLock(KIRQL Irql)
|
IoReleaseCancelSpinLock(KIRQL Irql)
|
||||||
{
|
{
|
||||||
KeReleaseSpinLock(&CancelSpinLock,Irql);
|
/* Release the internal lock */
|
||||||
|
KeReleaseSpinLock(&CancelSpinLock,Irql);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
PEPROCESS
|
PEPROCESS
|
||||||
STDCALL
|
NTAPI
|
||||||
IoThreadToProcess(IN PETHREAD Thread)
|
IoThreadToProcess(IN PETHREAD Thread)
|
||||||
{
|
{
|
||||||
return(Thread->ThreadsProcess);
|
/* Return the thread's process */
|
||||||
|
return Thread->ThreadsProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
NTSTATUS STDCALL
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
IoCheckDesiredAccess(IN OUT PACCESS_MASK DesiredAccess,
|
IoCheckDesiredAccess(IN OUT PACCESS_MASK DesiredAccess,
|
||||||
IN ACCESS_MASK GrantedAccess)
|
IN ACCESS_MASK GrantedAccess)
|
||||||
{
|
{
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
RtlMapGenericMask(DesiredAccess,
|
/* Map the generic mask */
|
||||||
&IoFileObjectType->TypeInfo.GenericMapping);
|
RtlMapGenericMask(DesiredAccess,
|
||||||
|
&IoFileObjectType->TypeInfo.GenericMapping);
|
||||||
|
|
||||||
if ((~(*DesiredAccess) & GrantedAccess) != 0)
|
/* Fail if the access masks don't grant full access */
|
||||||
return STATUS_ACCESS_DENIED;
|
if ((~(*DesiredAccess) & GrantedAccess)) return STATUS_ACCESS_DENIED;
|
||||||
else
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
NTSTATUS STDCALL
|
|
||||||
IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer,
|
|
||||||
IN ULONG EaLength,
|
|
||||||
OUT PULONG ErrorOffset)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return(STATUS_NOT_IMPLEMENTED);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
NTSTATUS STDCALL
|
|
||||||
IoCheckFunctionAccess(IN ACCESS_MASK GrantedAccess,
|
|
||||||
IN UCHAR MajorFunction,
|
|
||||||
IN UCHAR MinorFunction,
|
|
||||||
IN ULONG IoControlCode,
|
|
||||||
IN PVOID ExtraData OPTIONAL,
|
|
||||||
IN PVOID ExtraData2 OPTIONAL)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return(STATUS_NOT_IMPLEMENTED);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
IoValidateDeviceIoControlAccess(IN PIRP Irp,
|
IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer,
|
||||||
IN ULONG RequiredAccess)
|
IN ULONG EaLength,
|
||||||
|
OUT PULONG ErrorOffset)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
IoCheckFunctionAccess(IN ACCESS_MASK GrantedAccess,
|
||||||
|
IN UCHAR MajorFunction,
|
||||||
|
IN UCHAR MinorFunction,
|
||||||
|
IN ULONG IoControlCode,
|
||||||
|
IN PVOID ExtraData OPTIONAL,
|
||||||
|
IN PVOID ExtraData2 OPTIONAL)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
IoValidateDeviceIoControlAccess(IN PIRP Irp,
|
||||||
|
IN ULONG RequiredAccess)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
@ -162,37 +163,36 @@ IoValidateDeviceIoControlAccess(IN PIRP Irp,
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID STDCALL
|
VOID
|
||||||
|
NTAPI
|
||||||
IoSetDeviceToVerify(IN PETHREAD Thread,
|
IoSetDeviceToVerify(IN PETHREAD Thread,
|
||||||
IN PDEVICE_OBJECT DeviceObject)
|
IN PDEVICE_OBJECT DeviceObject)
|
||||||
{
|
{
|
||||||
Thread->DeviceToVerify = DeviceObject;
|
/* Set the pointer in the thread */
|
||||||
|
Thread->DeviceToVerify = DeviceObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID STDCALL
|
VOID
|
||||||
|
NTAPI
|
||||||
IoSetHardErrorOrVerifyDevice(IN PIRP Irp,
|
IoSetHardErrorOrVerifyDevice(IN PIRP Irp,
|
||||||
IN PDEVICE_OBJECT DeviceObject)
|
IN PDEVICE_OBJECT DeviceObject)
|
||||||
{
|
{
|
||||||
Irp->Tail.Overlay.Thread->DeviceToVerify = DeviceObject;
|
/* Set the pointer in the IRP */
|
||||||
|
Irp->Tail.Overlay.Thread->DeviceToVerify = DeviceObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
PDEVICE_OBJECT STDCALL
|
PDEVICE_OBJECT
|
||||||
|
NTAPI
|
||||||
IoGetDeviceToVerify(IN PETHREAD Thread)
|
IoGetDeviceToVerify(IN PETHREAD Thread)
|
||||||
/*
|
|
||||||
* FUNCTION: Returns a pointer to the device, representing a removable-media
|
|
||||||
* device, that is the target of the given thread's I/O request
|
|
||||||
*/
|
|
||||||
{
|
{
|
||||||
return(Thread->DeviceToVerify);
|
/* Return the pointer that was set with IoSetDeviceToVerify */
|
||||||
|
return Thread->DeviceToVerify;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue