mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[KS/NTOSKRNL/WIN32K] Fix MSVC warnings
[WMILIB] Don't put it in a cab file, so we can use it in first stage [DDK/VDDSVC.H] use the 16 bit interface only on MIPS [WINE/PORT.H] WIN32 -> _WIN32 [NTOSKRNL] KfAcquire/ReleaseSpinLock -> KeAcquire/ReleaseSpinLock [NTOSKRNL] Make sure KeUpdateSystemTime returns properly on non-x86 builds svn path=/trunk/; revision=63220
This commit is contained in:
parent
a74ecc13fd
commit
2b89f1925e
|
@ -28,7 +28,7 @@ KspCreateObjectType(
|
||||||
|
|
||||||
/* calculate request length */
|
/* calculate request length */
|
||||||
Name.Length = 0;
|
Name.Length = 0;
|
||||||
Name.MaximumLength = wcslen(ObjectType) * sizeof(WCHAR) + CreateParametersSize + 1 * sizeof(WCHAR);
|
Name.MaximumLength = (USHORT)(wcslen(ObjectType) * sizeof(WCHAR) + CreateParametersSize + 1 * sizeof(WCHAR));
|
||||||
Name.MaximumLength += sizeof(WCHAR);
|
Name.MaximumLength += sizeof(WCHAR);
|
||||||
/* acquire request buffer */
|
/* acquire request buffer */
|
||||||
Name.Buffer = AllocateItem(NonPagedPool, Name.MaximumLength);
|
Name.Buffer = AllocateItem(NonPagedPool, Name.MaximumLength);
|
||||||
|
@ -39,7 +39,7 @@ KspCreateObjectType(
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* build a request which looks like {ObjectClass}\CreateParameters
|
/* build a request which looks like {ObjectClass}\CreateParameters
|
||||||
* For pins the parent is the reference string used in registration
|
* For pins the parent is the reference string used in registration
|
||||||
* For clocks it is full path for pin\{ClockGuid}\ClockCreateParams
|
* For clocks it is full path for pin\{ClockGuid}\ClockCreateParams
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,4 +12,4 @@ set_module_type(wmilib kernelmodedriver ENTRYPOINT 0)
|
||||||
|
|
||||||
add_importlibs(wmilib ntoskrnl)
|
add_importlibs(wmilib ntoskrnl)
|
||||||
|
|
||||||
add_cd_file(TARGET wmilib DESTINATION reactos/system32/drivers FOR all)
|
add_cd_file(TARGET wmilib DESTINATION reactos/system32/drivers NO_CAB FOR all)
|
||||||
|
|
|
@ -50,7 +50,7 @@ call_ica_hw_interrupt
|
||||||
*/
|
*/
|
||||||
PVOID WINAPI getIntelRegistersPointer(VOID);
|
PVOID WINAPI getIntelRegistersPointer(VOID);
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifndef _M_MIPS
|
||||||
|
|
||||||
ULONG WINAPI getEAX(VOID);
|
ULONG WINAPI getEAX(VOID);
|
||||||
VOID WINAPI setEAX(ULONG);
|
VOID WINAPI setEAX(ULONG);
|
||||||
|
|
|
@ -278,7 +278,7 @@ ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
|
||||||
#endif /* HAVE_PWRITE */
|
#endif /* HAVE_PWRITE */
|
||||||
#endif /* __REACTOS__ */
|
#endif /* __REACTOS__ */
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#ifndef HAVE_SIGSETJMP
|
#ifndef HAVE_SIGSETJMP
|
||||||
# include <setjmp.h>
|
# include <setjmp.h>
|
||||||
typedef jmp_buf sigjmp_buf;
|
typedef jmp_buf sigjmp_buf;
|
||||||
|
|
|
@ -1964,7 +1964,7 @@ QSI_DEF(SystemLookasideInformation)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Acquire spinlock for ExpNonPagedLookasideListHead */
|
/* Acquire spinlock for ExpNonPagedLookasideListHead */
|
||||||
OldIrql = KfAcquireSpinLock(&ExpNonPagedLookasideListLock);
|
KeAcquireSpinLock(&ExpNonPagedLookasideListLock, &OldIrql);
|
||||||
|
|
||||||
/* Copy info from non-paged lookaside lists */
|
/* Copy info from non-paged lookaside lists */
|
||||||
ExpCopyLookasideInformation(&Info,
|
ExpCopyLookasideInformation(&Info,
|
||||||
|
@ -1973,7 +1973,7 @@ QSI_DEF(SystemLookasideInformation)
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
/* Release spinlock for ExpNonPagedLookasideListHead */
|
/* Release spinlock for ExpNonPagedLookasideListHead */
|
||||||
KfReleaseSpinLock(&ExpNonPagedLookasideListLock, OldIrql);
|
KeReleaseSpinLock(&ExpNonPagedLookasideListLock, OldIrql);
|
||||||
|
|
||||||
if (Remaining == 0)
|
if (Remaining == 0)
|
||||||
{
|
{
|
||||||
|
@ -1981,7 +1981,7 @@ QSI_DEF(SystemLookasideInformation)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Acquire spinlock for ExpPagedLookasideListHead */
|
/* Acquire spinlock for ExpPagedLookasideListHead */
|
||||||
OldIrql = KfAcquireSpinLock(&ExpPagedLookasideListLock);
|
KeAcquireSpinLock(&ExpPagedLookasideListLock, &OldIrql);
|
||||||
|
|
||||||
/* Copy info from paged lookaside lists */
|
/* Copy info from paged lookaside lists */
|
||||||
ExpCopyLookasideInformation(&Info,
|
ExpCopyLookasideInformation(&Info,
|
||||||
|
@ -1990,7 +1990,7 @@ QSI_DEF(SystemLookasideInformation)
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
/* Release spinlock for ExpPagedLookasideListHead */
|
/* Release spinlock for ExpPagedLookasideListHead */
|
||||||
KfReleaseSpinLock(&ExpPagedLookasideListLock, OldIrql);
|
KeReleaseSpinLock(&ExpPagedLookasideListLock, OldIrql);
|
||||||
|
|
||||||
Leave:
|
Leave:
|
||||||
|
|
||||||
|
|
|
@ -296,7 +296,7 @@ MI_IS_MAPPED_PTE(PMMPTE PointerPte)
|
||||||
{
|
{
|
||||||
/// FIXME
|
/// FIXME
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
return (PointerPte->u.Long & 0xFFFFFC01 != 0);
|
return ((PointerPte->u.Long & 0xFFFFFC01) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -78,6 +78,9 @@ KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||||
/* Increase interrupt count and end the interrupt */
|
/* Increase interrupt count and end the interrupt */
|
||||||
Prcb->InterruptCount++;
|
Prcb->InterruptCount++;
|
||||||
KiEndInterrupt(Irql, TrapFrame);
|
KiEndInterrupt(Irql, TrapFrame);
|
||||||
|
|
||||||
|
/* Note: non-x86 return back to the caller! */
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the increment time to the shared data */
|
/* Add the increment time to the shared data */
|
||||||
|
|
|
@ -132,9 +132,9 @@ PspInsertQuotaBlock(
|
||||||
{
|
{
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
OldIrql = KfAcquireSpinLock(&PspQuotaLock);
|
KeAcquireSpinLock(&PspQuotaLock, &OldIrql);
|
||||||
InsertTailList(&PspQuotaBlockList, &QuotaBlock->QuotaList);
|
InsertTailList(&PspQuotaBlockList, &QuotaBlock->QuotaList);
|
||||||
KfReleaseSpinLock(&PspQuotaLock, OldIrql);
|
KeReleaseSpinLock(&PspQuotaLock, OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -147,9 +147,9 @@ PspDestroyQuotaBlock(PEPROCESS Process)
|
||||||
if (QuotaBlock != &PspDefaultQuotaBlock &&
|
if (QuotaBlock != &PspDefaultQuotaBlock &&
|
||||||
InterlockedDecrementUL(&QuotaBlock->ReferenceCount) == 0)
|
InterlockedDecrementUL(&QuotaBlock->ReferenceCount) == 0)
|
||||||
{
|
{
|
||||||
OldIrql = KfAcquireSpinLock(&PspQuotaLock);
|
KeAcquireSpinLock(&PspQuotaLock, &OldIrql);
|
||||||
RemoveEntryList(&QuotaBlock->QuotaList);
|
RemoveEntryList(&QuotaBlock->QuotaList);
|
||||||
KfReleaseSpinLock(&PspQuotaLock, OldIrql);
|
KeReleaseSpinLock(&PspQuotaLock, OldIrql);
|
||||||
ExFreePool(QuotaBlock);
|
ExFreePool(QuotaBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ HackSecureVirtualMemory(
|
||||||
else if (ProbeMode == PAGE_READWRITE) Operation = IoModifyAccess;
|
else if (ProbeMode == PAGE_READWRITE) Operation = IoModifyAccess;
|
||||||
else return NULL;
|
else return NULL;
|
||||||
|
|
||||||
pmdl = IoAllocateMdl(Address, Size, FALSE, TRUE, NULL);
|
pmdl = IoAllocateMdl(Address, (ULONG)Size, FALSE, TRUE, NULL);
|
||||||
if (pmdl == NULL)
|
if (pmdl == NULL)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -19,11 +19,11 @@ RtlInitLargeAnsiString(
|
||||||
IN PCSZ SourceString,
|
IN PCSZ SourceString,
|
||||||
IN INT Unknown)
|
IN INT Unknown)
|
||||||
{
|
{
|
||||||
ULONG DestSize;
|
USHORT DestSize;
|
||||||
|
|
||||||
if (SourceString)
|
if (SourceString)
|
||||||
{
|
{
|
||||||
DestSize = strlen(SourceString);
|
DestSize = (USHORT)strlen(SourceString);
|
||||||
DestinationString->Length = DestSize;
|
DestinationString->Length = DestSize;
|
||||||
DestinationString->MaximumLength = DestSize + sizeof(CHAR);
|
DestinationString->MaximumLength = DestSize + sizeof(CHAR);
|
||||||
}
|
}
|
||||||
|
@ -44,11 +44,11 @@ RtlInitLargeUnicodeString(
|
||||||
IN PCWSTR SourceString,
|
IN PCWSTR SourceString,
|
||||||
IN INT Unknown)
|
IN INT Unknown)
|
||||||
{
|
{
|
||||||
ULONG DestSize;
|
USHORT DestSize;
|
||||||
|
|
||||||
if (SourceString)
|
if (SourceString)
|
||||||
{
|
{
|
||||||
DestSize = wcslen(SourceString) * sizeof(WCHAR);
|
DestSize = (USHORT)wcslen(SourceString) * sizeof(WCHAR);
|
||||||
DestinationString->Length = DestSize;
|
DestinationString->Length = DestSize;
|
||||||
DestinationString->MaximumLength = DestSize + sizeof(WCHAR);
|
DestinationString->MaximumLength = DestSize + sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// SVC_(<NAME>, <ARG_COUNT>)
|
// SVC_(<NAME>, <ARG_COUNT>)
|
||||||
//
|
//
|
||||||
// Funcs, order, should, match, Windows, XP, 5.1.2600, SP2)
|
// Funcs order should match Windows XP 5.1.2600 SP2
|
||||||
//
|
//
|
||||||
SVC_(GdiAbortDoc, 1)
|
SVC_(GdiAbortDoc, 1)
|
||||||
SVC_(GdiAbortPath, 1)
|
SVC_(GdiAbortPath, 1)
|
||||||
|
@ -235,7 +235,7 @@ SVC_(GdiMonoBitmap, 1)
|
||||||
SVC_(GdiMoveTo, 4)
|
SVC_(GdiMoveTo, 4)
|
||||||
SVC_(GdiOffsetClipRgn, 3)
|
SVC_(GdiOffsetClipRgn, 3)
|
||||||
SVC_(GdiOffsetRgn, 3)
|
SVC_(GdiOffsetRgn, 3)
|
||||||
SVC_(GdiOpenDCW, 8)
|
SVC_(GdiOpenDCW, 8) /* FIXME: 7 params on XP */
|
||||||
SVC_(GdiPatBlt, 6)
|
SVC_(GdiPatBlt, 6)
|
||||||
SVC_(GdiPolyPatBlt, 5)
|
SVC_(GdiPolyPatBlt, 5)
|
||||||
SVC_(GdiPathToRegion, 1)
|
SVC_(GdiPathToRegion, 1)
|
||||||
|
@ -374,8 +374,7 @@ SVC_(UserEndDeferWindowPosEx, 2)
|
||||||
SVC_(UserEndMenu, 0)
|
SVC_(UserEndMenu, 0)
|
||||||
SVC_(UserEndPaint, 2)
|
SVC_(UserEndPaint, 2)
|
||||||
SVC_(UserEnumDisplayDevices, 4)
|
SVC_(UserEnumDisplayDevices, 4)
|
||||||
// SVC_(UserEnumDisplayMonitors, 4, Wrong, number, of, param, ?)
|
SVC_(UserEnumDisplayMonitors, 5) /* FIXME: 4 on XP */
|
||||||
SVC_(UserEnumDisplayMonitors, 5)
|
|
||||||
SVC_(UserEnumDisplaySettings, 4)
|
SVC_(UserEnumDisplaySettings, 4)
|
||||||
SVC_(UserEvent, 1)
|
SVC_(UserEvent, 1)
|
||||||
SVC_(UserExcludeUpdateRgn, 2)
|
SVC_(UserExcludeUpdateRgn, 2)
|
||||||
|
@ -496,7 +495,7 @@ SVC_(UserRealInternalGetMessage, 6)
|
||||||
SVC_(UserRealWaitMessageEx, 2)
|
SVC_(UserRealWaitMessageEx, 2)
|
||||||
SVC_(UserRedrawWindow, 4)
|
SVC_(UserRedrawWindow, 4)
|
||||||
SVC_(UserRegisterClassExWOW, 7)
|
SVC_(UserRegisterClassExWOW, 7)
|
||||||
SVC_(UserRegisterUserApiHook, 4)
|
SVC_(UserRegisterUserApiHook, 4) /* FIXME: 2 params on XP */
|
||||||
SVC_(UserRegisterHotKey, 4)
|
SVC_(UserRegisterHotKey, 4)
|
||||||
SVC_(UserRegisterRawInputDevices, 3)
|
SVC_(UserRegisterRawInputDevices, 3)
|
||||||
SVC_(UserRegisterTasklist, 1)
|
SVC_(UserRegisterTasklist, 1)
|
||||||
|
@ -590,7 +589,7 @@ SVC_(UserUnregisterUserApiHook, 0)
|
||||||
SVC_(UserUnregisterHotKey, 2)
|
SVC_(UserUnregisterHotKey, 2)
|
||||||
SVC_(UserUpdateInputContext, 3)
|
SVC_(UserUpdateInputContext, 3)
|
||||||
SVC_(UserUpdateInstance, 3)
|
SVC_(UserUpdateInstance, 3)
|
||||||
SVC_(UserUpdateLayeredWindow, 10)
|
SVC_(UserUpdateLayeredWindow, 10) /* FIXME: 9 params on XP */
|
||||||
SVC_(UserGetLayeredWindowAttributes, 4)
|
SVC_(UserGetLayeredWindowAttributes, 4)
|
||||||
SVC_(UserSetLayeredWindowAttributes, 4)
|
SVC_(UserSetLayeredWindowAttributes, 4)
|
||||||
SVC_(UserUpdatePerUserSystemParameters, 2)
|
SVC_(UserUpdatePerUserSystemParameters, 2)
|
||||||
|
|
Loading…
Reference in a new issue