Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
556bc037
Commit
556bc037
authored
Feb 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Specify fastcall entry points using the appropriate spec file flag.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e22fda84
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
134 deletions
+53
-134
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+10
-51
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+19
-19
ntoskrnl_private.h
dlls/ntoskrnl.exe/ntoskrnl_private.h
+10
-13
sync.c
dlls/ntoskrnl.exe/sync.c
+14
-51
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
556bc037
...
@@ -1739,12 +1739,8 @@ NTSTATUS WINAPI IoCallDriver( DEVICE_OBJECT *device, IRP *irp )
...
@@ -1739,12 +1739,8 @@ NTSTATUS WINAPI IoCallDriver( DEVICE_OBJECT *device, IRP *irp )
/***********************************************************************
/***********************************************************************
* IofCallDriver (NTOSKRNL.EXE.@)
* IofCallDriver (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
IofCallDriver
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
IofCallDriver
)
NTSTATUS
WINAPI
DECLSPEC_HIDDEN
__regs_IofCallDriver
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
#else
NTSTATUS
WINAPI
IofCallDriver
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
NTSTATUS
WINAPI
IofCallDriver
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
#endif
{
{
TRACE
(
"%p %p
\n
"
,
device
,
irp
);
TRACE
(
"%p %p
\n
"
,
device
,
irp
);
return
IoCallDriver
(
device
,
irp
);
return
IoCallDriver
(
device
,
irp
);
...
@@ -2073,12 +2069,8 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
...
@@ -2073,12 +2069,8 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
/***********************************************************************
/***********************************************************************
* IofCompleteRequest (NTOSKRNL.EXE.@)
* IofCompleteRequest (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
IofCompleteRequest
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
IofCompleteRequest
)
void
WINAPI
DECLSPEC_HIDDEN
__regs_IofCompleteRequest
(
IRP
*
irp
,
UCHAR
priority_boost
)
#else
void
WINAPI
IofCompleteRequest
(
IRP
*
irp
,
UCHAR
priority_boost
)
void
WINAPI
IofCompleteRequest
(
IRP
*
irp
,
UCHAR
priority_boost
)
#endif
{
{
TRACE
(
"%p %u
\n
"
,
irp
,
priority_boost
);
TRACE
(
"%p %u
\n
"
,
irp
,
priority_boost
);
IoCompleteRequest
(
irp
,
priority_boost
);
IoCompleteRequest
(
irp
,
priority_boost
);
...
@@ -2088,12 +2080,8 @@ void WINAPI IofCompleteRequest( IRP *irp, UCHAR priority_boost )
...
@@ -2088,12 +2080,8 @@ void WINAPI IofCompleteRequest( IRP *irp, UCHAR priority_boost )
/***********************************************************************
/***********************************************************************
* InterlockedCompareExchange (NTOSKRNL.EXE.@)
* InterlockedCompareExchange (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL3_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
NTOSKRNL_InterlockedCompareExchange
,
12
)
DEFINE_FASTCALL3_ENTRYPOINT
(
NTOSKRNL_InterlockedCompareExchange
)
LONG
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
#else
LONG
WINAPI
NTOSKRNL_InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
LONG
WINAPI
NTOSKRNL_InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
#endif
{
{
return
InterlockedCompareExchange
(
dest
,
xchg
,
compare
);
return
InterlockedCompareExchange
(
dest
,
xchg
,
compare
);
}
}
...
@@ -2102,12 +2090,8 @@ LONG WINAPI NTOSKRNL_InterlockedCompareExchange( LONG volatile *dest, LONG xchg,
...
@@ -2102,12 +2090,8 @@ LONG WINAPI NTOSKRNL_InterlockedCompareExchange( LONG volatile *dest, LONG xchg,
/***********************************************************************
/***********************************************************************
* InterlockedDecrement (NTOSKRNL.EXE.@)
* InterlockedDecrement (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
NTOSKRNL_InterlockedDecrement
)
DEFINE_FASTCALL1_ENTRYPOINT
(
NTOSKRNL_InterlockedDecrement
)
LONG
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedDecrement
(
LONG
volatile
*
dest
)
#else
LONG
WINAPI
NTOSKRNL_InterlockedDecrement
(
LONG
volatile
*
dest
)
LONG
WINAPI
NTOSKRNL_InterlockedDecrement
(
LONG
volatile
*
dest
)
#endif
{
{
return
InterlockedDecrement
(
dest
);
return
InterlockedDecrement
(
dest
);
}
}
...
@@ -2116,12 +2100,8 @@ LONG WINAPI NTOSKRNL_InterlockedDecrement( LONG volatile *dest )
...
@@ -2116,12 +2100,8 @@ LONG WINAPI NTOSKRNL_InterlockedDecrement( LONG volatile *dest )
/***********************************************************************
/***********************************************************************
* InterlockedExchange (NTOSKRNL.EXE.@)
* InterlockedExchange (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
NTOSKRNL_InterlockedExchange
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
NTOSKRNL_InterlockedExchange
)
LONG
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedExchange
(
LONG
volatile
*
dest
,
LONG
val
)
#else
LONG
WINAPI
NTOSKRNL_InterlockedExchange
(
LONG
volatile
*
dest
,
LONG
val
)
LONG
WINAPI
NTOSKRNL_InterlockedExchange
(
LONG
volatile
*
dest
,
LONG
val
)
#endif
{
{
return
InterlockedExchange
(
dest
,
val
);
return
InterlockedExchange
(
dest
,
val
);
}
}
...
@@ -2130,12 +2110,8 @@ LONG WINAPI NTOSKRNL_InterlockedExchange( LONG volatile *dest, LONG val )
...
@@ -2130,12 +2110,8 @@ LONG WINAPI NTOSKRNL_InterlockedExchange( LONG volatile *dest, LONG val )
/***********************************************************************
/***********************************************************************
* InterlockedExchangeAdd (NTOSKRNL.EXE.@)
* InterlockedExchangeAdd (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
NTOSKRNL_InterlockedExchangeAdd
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
NTOSKRNL_InterlockedExchangeAdd
)
LONG
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedExchangeAdd
(
LONG
volatile
*
dest
,
LONG
incr
)
#else
LONG
WINAPI
NTOSKRNL_InterlockedExchangeAdd
(
LONG
volatile
*
dest
,
LONG
incr
)
LONG
WINAPI
NTOSKRNL_InterlockedExchangeAdd
(
LONG
volatile
*
dest
,
LONG
incr
)
#endif
{
{
return
InterlockedExchangeAdd
(
dest
,
incr
);
return
InterlockedExchangeAdd
(
dest
,
incr
);
}
}
...
@@ -2144,12 +2120,8 @@ LONG WINAPI NTOSKRNL_InterlockedExchangeAdd( LONG volatile *dest, LONG incr )
...
@@ -2144,12 +2120,8 @@ LONG WINAPI NTOSKRNL_InterlockedExchangeAdd( LONG volatile *dest, LONG incr )
/***********************************************************************
/***********************************************************************
* InterlockedIncrement (NTOSKRNL.EXE.@)
* InterlockedIncrement (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
NTOSKRNL_InterlockedIncrement
)
DEFINE_FASTCALL1_ENTRYPOINT
(
NTOSKRNL_InterlockedIncrement
)
LONG
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedIncrement
(
LONG
volatile
*
dest
)
#else
LONG
WINAPI
NTOSKRNL_InterlockedIncrement
(
LONG
volatile
*
dest
)
LONG
WINAPI
NTOSKRNL_InterlockedIncrement
(
LONG
volatile
*
dest
)
#endif
{
{
return
InterlockedIncrement
(
dest
);
return
InterlockedIncrement
(
dest
);
}
}
...
@@ -2736,12 +2708,8 @@ NTSTATUS WINAPI ObReferenceObjectByPointer(void *obj, ACCESS_MASK access,
...
@@ -2736,12 +2708,8 @@ NTSTATUS WINAPI ObReferenceObjectByPointer(void *obj, ACCESS_MASK access,
/***********************************************************************
/***********************************************************************
* ObfReferenceObject (NTOSKRNL.EXE.@)
* ObfReferenceObject (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
ObfReferenceObject
)
DEFINE_FASTCALL1_ENTRYPOINT
(
ObfReferenceObject
)
void
WINAPI
DECLSPEC_HIDDEN
__regs_ObfReferenceObject
(
void
*
obj
)
#else
void
WINAPI
ObfReferenceObject
(
void
*
obj
)
void
WINAPI
ObfReferenceObject
(
void
*
obj
)
#endif
{
{
ObReferenceObject
(
obj
);
ObReferenceObject
(
obj
);
}
}
...
@@ -2750,12 +2718,8 @@ void WINAPI ObfReferenceObject( void *obj )
...
@@ -2750,12 +2718,8 @@ void WINAPI ObfReferenceObject( void *obj )
/***********************************************************************
/***********************************************************************
* ObfDereferenceObject (NTOSKRNL.EXE.@)
* ObfDereferenceObject (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
ObfDereferenceObject
)
DEFINE_FASTCALL1_ENTRYPOINT
(
ObfDereferenceObject
)
void
WINAPI
DECLSPEC_HIDDEN
__regs_ObfDereferenceObject
(
void
*
obj
)
#else
void
WINAPI
ObfDereferenceObject
(
void
*
obj
)
void
WINAPI
ObfDereferenceObject
(
void
*
obj
)
#endif
{
{
ObDereferenceObject
(
obj
);
ObDereferenceObject
(
obj
);
}
}
...
@@ -4053,13 +4017,8 @@ typedef struct _EX_PUSH_LOCK_WAIT_BLOCK *PEX_PUSH_LOCK_WAIT_BLOCK;
...
@@ -4053,13 +4017,8 @@ typedef struct _EX_PUSH_LOCK_WAIT_BLOCK *PEX_PUSH_LOCK_WAIT_BLOCK;
/*********************************************************************
/*********************************************************************
* ExfUnblockPushLock (NTOSKRNL.@)
* ExfUnblockPushLock (NTOSKRNL.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
ExfUnblockPushLock
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
ExfUnblockPushLock
)
void
WINAPI
DECLSPEC_HIDDEN
__regs_ExfUnblockPushLock
(
EX_PUSH_LOCK
*
lock
,
PEX_PUSH_LOCK_WAIT_BLOCK
block
)
#else
void
WINAPI
ExfUnblockPushLock
(
EX_PUSH_LOCK
*
lock
,
PEX_PUSH_LOCK_WAIT_BLOCK
block
)
void
WINAPI
ExfUnblockPushLock
(
EX_PUSH_LOCK
*
lock
,
PEX_PUSH_LOCK_WAIT_BLOCK
block
)
#endif
{
{
FIXME
(
"stub: %p, %p
\n
"
,
lock
,
block
);
FIXME
(
"stub: %p, %p
\n
"
,
lock
,
block
);
}
}
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
556bc037
@ stdcall -
norelay
ExAcquireFastMutexUnsafe(ptr)
@ stdcall -
fastcall
ExAcquireFastMutexUnsafe(ptr)
@ stub ExAcquireRundownProtection
@ stub ExAcquireRundownProtection
@ stub ExAcquireRundownProtectionEx
@ stub ExAcquireRundownProtectionEx
@ stub ExInitializeRundownProtection
@ stub ExInitializeRundownProtection
@ stub ExInterlockedAddLargeStatistic
@ stub ExInterlockedAddLargeStatistic
@ stub ExInterlockedCompareExchange64
@ stub ExInterlockedCompareExchange64
@ stub ExInterlockedFlushSList
@ stub ExInterlockedFlushSList
@ stdcall -
arch=i386 -norelay
ExInterlockedPopEntrySList(ptr ptr) NTOSKRNL_ExInterlockedPopEntrySList
@ stdcall -
fastcall -arch=i386
ExInterlockedPopEntrySList(ptr ptr) NTOSKRNL_ExInterlockedPopEntrySList
@ stdcall -
arch=i386 -norelay
ExInterlockedPushEntrySList (ptr ptr ptr) NTOSKRNL_ExInterlockedPushEntrySList
@ stdcall -
fastcall -arch=i386
ExInterlockedPushEntrySList (ptr ptr ptr) NTOSKRNL_ExInterlockedPushEntrySList
@ stub ExReInitializeRundownProtection
@ stub ExReInitializeRundownProtection
@ stdcall -
norelay
ExReleaseFastMutexUnsafe(ptr)
@ stdcall -
fastcall
ExReleaseFastMutexUnsafe(ptr)
@ stdcall ExReleaseResourceLite(ptr)
@ stdcall ExReleaseResourceLite(ptr)
@ stub ExReleaseRundownProtection
@ stub ExReleaseRundownProtection
@ stub ExReleaseRundownProtectionEx
@ stub ExReleaseRundownProtectionEx
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
@ stub ExfInterlockedInsertTailList
@ stub ExfInterlockedInsertTailList
@ stub ExfInterlockedPopEntryList
@ stub ExfInterlockedPopEntryList
@ stub ExfInterlockedPushEntryList
@ stub ExfInterlockedPushEntryList
@ stdcall -
norelay
-arch=i386 ExfInterlockedRemoveHeadList(ptr ptr)
@ stdcall -
fastcall
-arch=i386 ExfInterlockedRemoveHeadList(ptr ptr)
@ stub ExfReleasePushLock
@ stub ExfReleasePushLock
@ stub Exfi386InterlockedDecrementLong
@ stub Exfi386InterlockedDecrementLong
@ stub Exfi386InterlockedExchangeUlong
@ stub Exfi386InterlockedExchangeUlong
...
@@ -30,35 +30,35 @@
...
@@ -30,35 +30,35 @@
@ stdcall -arch=win64 ExpInterlockedPopEntrySList(ptr) RtlInterlockedPopEntrySList
@ stdcall -arch=win64 ExpInterlockedPopEntrySList(ptr) RtlInterlockedPopEntrySList
@ stdcall -arch=win64 ExpInterlockedPushEntrySList(ptr ptr) RtlInterlockedPushEntrySList
@ stdcall -arch=win64 ExpInterlockedPushEntrySList(ptr ptr) RtlInterlockedPushEntrySList
@ stub HalExamineMBR
@ stub HalExamineMBR
@ stdcall -
norelay
InterlockedCompareExchange(ptr long long) NTOSKRNL_InterlockedCompareExchange
@ stdcall -
fastcall
InterlockedCompareExchange(ptr long long) NTOSKRNL_InterlockedCompareExchange
@ stdcall -
norelay
InterlockedDecrement(ptr) NTOSKRNL_InterlockedDecrement
@ stdcall -
fastcall
InterlockedDecrement(ptr) NTOSKRNL_InterlockedDecrement
@ stdcall -
norelay
InterlockedExchange(ptr long) NTOSKRNL_InterlockedExchange
@ stdcall -
fastcall
InterlockedExchange(ptr long) NTOSKRNL_InterlockedExchange
@ stdcall -
norelay
InterlockedExchangeAdd(ptr long) NTOSKRNL_InterlockedExchangeAdd
@ stdcall -
fastcall
InterlockedExchangeAdd(ptr long) NTOSKRNL_InterlockedExchangeAdd
@ stdcall -
norelay
InterlockedIncrement(ptr) NTOSKRNL_InterlockedIncrement
@ stdcall -
fastcall
InterlockedIncrement(ptr) NTOSKRNL_InterlockedIncrement
@ stdcall -
arch=win32 -norelay
InterlockedPopEntrySList(ptr) NTOSKRNL_InterlockedPopEntrySList
@ stdcall -
fastcall -arch=win32
InterlockedPopEntrySList(ptr) NTOSKRNL_InterlockedPopEntrySList
@ stdcall -
arch=win32 -norelay
InterlockedPushEntrySList(ptr ptr) NTOSKRNL_InterlockedPushEntrySList
@ stdcall -
fastcall -arch=win32
InterlockedPushEntrySList(ptr ptr) NTOSKRNL_InterlockedPushEntrySList
@ stdcall -arch=win64 ExQueryDepthSList(ptr) RtlQueryDepthSList
@ stdcall -arch=win64 ExQueryDepthSList(ptr) RtlQueryDepthSList
@ stub IoAssignDriveLetters
@ stub IoAssignDriveLetters
@ stub IoReadPartitionTable
@ stub IoReadPartitionTable
@ stub IoSetPartitionInformation
@ stub IoSetPartitionInformation
@ stub IoWritePartitionTable
@ stub IoWritePartitionTable
@ stdcall -
norelay
IofCallDriver(ptr ptr)
@ stdcall -
fastcall
IofCallDriver(ptr ptr)
@ stdcall -
norelay
IofCompleteRequest(ptr long)
@ stdcall -
fastcall
IofCompleteRequest(ptr long)
@ stdcall -arch=arm,arm64,x86_64 KeAcquireInStackQueuedSpinLock(ptr ptr)
@ stdcall -arch=arm,arm64,x86_64 KeAcquireInStackQueuedSpinLock(ptr ptr)
@ stdcall -
norelay
KeAcquireInStackQueuedSpinLockAtDpcLevel(ptr ptr)
@ stdcall -
fastcall
KeAcquireInStackQueuedSpinLockAtDpcLevel(ptr ptr)
@ stdcall KeEnterGuardedRegion()
@ stdcall KeEnterGuardedRegion()
@ stdcall KeExpandKernelStackAndCallout(ptr ptr long)
@ stdcall KeExpandKernelStackAndCallout(ptr ptr long)
@ stdcall KeExpandKernelStackAndCalloutEx(ptr ptr long long ptr)
@ stdcall KeExpandKernelStackAndCalloutEx(ptr ptr long long ptr)
@ stdcall KeLeaveGuardedRegion()
@ stdcall KeLeaveGuardedRegion()
@ stdcall -arch=arm,arm64,x86_64 KeReleaseInStackQueuedSpinLock(ptr)
@ stdcall -arch=arm,arm64,x86_64 KeReleaseInStackQueuedSpinLock(ptr)
@ stdcall -
norelay
KeReleaseInStackQueuedSpinLockFromDpcLevel(ptr)
@ stdcall -
fastcall
KeReleaseInStackQueuedSpinLockFromDpcLevel(ptr)
@ stub KeSetTimeUpdateNotifyRoutine
@ stub KeSetTimeUpdateNotifyRoutine
@ stub KefAcquireSpinLockAtDpcLevel
@ stub KefAcquireSpinLockAtDpcLevel
@ stub KefReleaseSpinLockFromDpcLevel
@ stub KefReleaseSpinLockFromDpcLevel
@ stub KiAcquireSpinLock
@ stub KiAcquireSpinLock
@ stub KiReleaseSpinLock
@ stub KiReleaseSpinLock
@ stdcall -
norelay
ObfDereferenceObject(ptr)
@ stdcall -
fastcall
ObfDereferenceObject(ptr)
@ stdcall -
norelay
ObfReferenceObject(ptr)
@ stdcall -
fastcall
ObfReferenceObject(ptr)
@ stub RtlPrefetchMemoryNonTemporal
@ stub RtlPrefetchMemoryNonTemporal
@ cdecl -i386 -norelay RtlUlongByteSwap()
@ cdecl -i386 -norelay RtlUlongByteSwap()
@ cdecl -ret64 RtlUlonglongByteSwap(int64)
@ cdecl -ret64 RtlUlonglongByteSwap(int64)
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
@ stub ExEnumHandleTable
@ stub ExEnumHandleTable
@ extern ExEventObjectType
@ extern ExEventObjectType
@ stub ExExtendZone
@ stub ExExtendZone
@ stdcall -
norelay
ExfUnblockPushLock(ptr ptr)
@ stdcall -
fastcall
ExfUnblockPushLock(ptr ptr)
@ stdcall ExFreePool(ptr)
@ stdcall ExFreePool(ptr)
@ stdcall ExFreePoolWithTag(ptr long)
@ stdcall ExFreePoolWithTag(ptr long)
@ stub ExFreeToPagedLookasideList
@ stub ExFreeToPagedLookasideList
...
...
dlls/ntoskrnl.exe/ntoskrnl_private.h
View file @
556bc037
...
@@ -27,27 +27,24 @@ struct _OBJECT_TYPE {
...
@@ -27,27 +27,24 @@ struct _OBJECT_TYPE {
void
(
*
release
)(
void
*
);
/* called when the last reference is released */
void
(
*
release
)(
void
*
);
/* called when the last reference is released */
};
};
#ifdef __i386__
#ifdef __i386__
#define DEFINE_FASTCALL1_
ENTRYPOINT( name
) \
#define DEFINE_FASTCALL1_
WRAPPER(func
) \
__ASM_
STDCALL_FUNC( name, 4
, \
__ASM_
GLOBAL_FUNC( __fastcall_ ## func
, \
"popl %eax\n\t" \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(4))
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
#define DEFINE_FASTCALL2_ENTRYPOINT( name ) \
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( name, 8, \
__ASM_GLOBAL_FUNC( __fastcall_ ## func, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(8))
#define DEFINE_FASTCALL3_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 12, \
"popl %eax\n\t" \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(12))
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL1_WRAPPER(func)
/* nothing */
#define DEFINE_FASTCALL_WRAPPER(func,args)
/* nothing */
#endif
#endif
#endif
#endif
dlls/ntoskrnl.exe/sync.c
View file @
556bc037
...
@@ -436,12 +436,8 @@ void WINAPI KeReleaseSpinLockFromDpcLevel( KSPIN_LOCK *lock )
...
@@ -436,12 +436,8 @@ void WINAPI KeReleaseSpinLockFromDpcLevel( KSPIN_LOCK *lock )
/***********************************************************************
/***********************************************************************
* KeAcquireInStackQueuedSpinLockAtDpcLevel (NTOSKRNL.EXE.@)
* KeAcquireInStackQueuedSpinLockAtDpcLevel (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
KeAcquireInStackQueuedSpinLockAtDpcLevel
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
KeAcquireInStackQueuedSpinLockAtDpcLevel
)
void
WINAPI
DECLSPEC_HIDDEN
__regs_KeAcquireInStackQueuedSpinLockAtDpcLevel
(
KSPIN_LOCK
*
lock
,
KLOCK_QUEUE_HANDLE
*
queue
)
#else
void
WINAPI
KeAcquireInStackQueuedSpinLockAtDpcLevel
(
KSPIN_LOCK
*
lock
,
KLOCK_QUEUE_HANDLE
*
queue
)
void
WINAPI
KeAcquireInStackQueuedSpinLockAtDpcLevel
(
KSPIN_LOCK
*
lock
,
KLOCK_QUEUE_HANDLE
*
queue
)
#endif
{
{
KSPIN_LOCK_QUEUE
*
tail
;
KSPIN_LOCK_QUEUE
*
tail
;
...
@@ -467,12 +463,8 @@ void WINAPI KeAcquireInStackQueuedSpinLockAtDpcLevel( KSPIN_LOCK *lock, KLOCK_QU
...
@@ -467,12 +463,8 @@ void WINAPI KeAcquireInStackQueuedSpinLockAtDpcLevel( KSPIN_LOCK *lock, KLOCK_QU
/***********************************************************************
/***********************************************************************
* KeReleaseInStackQueuedSpinLockFromDpcLevel (NTOSKRNL.EXE.@)
* KeReleaseInStackQueuedSpinLockFromDpcLevel (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
KeReleaseInStackQueuedSpinLockFromDpcLevel
)
DEFINE_FASTCALL1_ENTRYPOINT
(
KeReleaseInStackQueuedSpinLockFromDpcLevel
)
void
WINAPI
DECLSPEC_HIDDEN
__regs_KeReleaseInStackQueuedSpinLockFromDpcLevel
(
KLOCK_QUEUE_HANDLE
*
queue
)
#else
void
WINAPI
KeReleaseInStackQueuedSpinLockFromDpcLevel
(
KLOCK_QUEUE_HANDLE
*
queue
)
void
WINAPI
KeReleaseInStackQueuedSpinLockFromDpcLevel
(
KLOCK_QUEUE_HANDLE
*
queue
)
#endif
{
{
KSPIN_LOCK
*
lock
=
(
KSPIN_LOCK
*
)((
ULONG_PTR
)
queue
->
LockQueue
.
Lock
&
~
QUEUED_SPINLOCK_OWNED
);
KSPIN_LOCK
*
lock
=
(
KSPIN_LOCK
*
)((
ULONG_PTR
)
queue
->
LockQueue
.
Lock
&
~
QUEUED_SPINLOCK_OWNED
);
KSPIN_LOCK_QUEUE
*
next
;
KSPIN_LOCK_QUEUE
*
next
;
...
@@ -555,13 +547,14 @@ void WINAPI IoReleaseCancelSpinLock( KIRQL irql )
...
@@ -555,13 +547,14 @@ void WINAPI IoReleaseCancelSpinLock( KIRQL irql )
KeReleaseSpinLock
(
&
cancel_lock
,
irql
);
KeReleaseSpinLock
(
&
cancel_lock
,
irql
);
}
}
#ifdef __i386__
/***********************************************************************
DEFINE_FASTCALL2_ENTRYPOINT
(
ExfInterlockedRemoveHeadList
)
* ExfInterlockedRemoveHeadList (NTOSKRNL.EXE.@)
PLIST_ENTRY
WINAPI
DECLSPEC_HIDDEN
__regs_ExfInterlockedRemoveHeadList
(
LIST_ENTRY
*
list
,
KSPIN_LOCK
*
lock
)
*/
DEFINE_FASTCALL_WRAPPER
(
ExfInterlockedRemoveHeadList
,
8
)
PLIST_ENTRY
WINAPI
ExfInterlockedRemoveHeadList
(
LIST_ENTRY
*
list
,
KSPIN_LOCK
*
lock
)
{
{
return
ExInterlockedRemoveHeadList
(
list
,
lock
);
return
ExInterlockedRemoveHeadList
(
list
,
lock
);
}
}
#endif
/***********************************************************************
/***********************************************************************
* ExInterlockedRemoveHeadList (NTOSKRNL.EXE.@)
* ExInterlockedRemoveHeadList (NTOSKRNL.EXE.@)
...
@@ -580,17 +573,12 @@ LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList( LIST_ENTRY *list, KSPIN_LOCK *l
...
@@ -580,17 +573,12 @@ LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList( LIST_ENTRY *list, KSPIN_LOCK *l
return
ret
;
return
ret
;
}
}
#ifndef _WIN64
/***********************************************************************
/***********************************************************************
* InterlockedPopEntrySList (NTOSKRNL.EXE.@)
* InterlockedPopEntrySList (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
NTOSKRNL_InterlockedPopEntrySList
)
DEFINE_FASTCALL1_ENTRYPOINT
(
NTOSKRNL_InterlockedPopEntrySList
)
PSLIST_ENTRY
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedPopEntrySList
(
PSLIST_HEADER
list
)
#else
PSLIST_ENTRY
WINAPI
NTOSKRNL_InterlockedPopEntrySList
(
PSLIST_HEADER
list
)
PSLIST_ENTRY
WINAPI
NTOSKRNL_InterlockedPopEntrySList
(
PSLIST_HEADER
list
)
#endif
{
{
return
RtlInterlockedPopEntrySList
(
list
);
return
RtlInterlockedPopEntrySList
(
list
);
}
}
...
@@ -599,59 +587,38 @@ PSLIST_ENTRY WINAPI NTOSKRNL_InterlockedPopEntrySList( PSLIST_HEADER list )
...
@@ -599,59 +587,38 @@ PSLIST_ENTRY WINAPI NTOSKRNL_InterlockedPopEntrySList( PSLIST_HEADER list )
/***********************************************************************
/***********************************************************************
* InterlockedPushEntrySList (NTOSKRNL.EXE.@)
* InterlockedPushEntrySList (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
NTOSKRNL_InterlockedPushEntrySList
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
NTOSKRNL_InterlockedPushEntrySList
)
PSLIST_ENTRY
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_InterlockedPushEntrySList
(
PSLIST_HEADER
list
,
PSLIST_ENTRY
entry
)
#else
PSLIST_ENTRY
WINAPI
NTOSKRNL_InterlockedPushEntrySList
(
PSLIST_HEADER
list
,
PSLIST_ENTRY
entry
)
PSLIST_ENTRY
WINAPI
NTOSKRNL_InterlockedPushEntrySList
(
PSLIST_HEADER
list
,
PSLIST_ENTRY
entry
)
#endif
{
{
return
RtlInterlockedPushEntrySList
(
list
,
entry
);
return
RtlInterlockedPushEntrySList
(
list
,
entry
);
}
}
#ifdef __i386__
/***********************************************************************
/***********************************************************************
* ExInterlockedPopEntrySList (NTOSKRNL.EXE.@)
* ExInterlockedPopEntrySList (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
NTOSKRNL_ExInterlockedPopEntrySList
,
8
)
DEFINE_FASTCALL2_ENTRYPOINT
(
NTOSKRNL_ExInterlockedPopEntrySList
)
PSLIST_ENTRY
WINAPI
__regs_NTOSKRNL_ExInterlockedPopEntrySList
(
PSLIST_HEADER
list
,
PKSPIN_LOCK
lock
)
#else
PSLIST_ENTRY
WINAPI
NTOSKRNL_ExInterlockedPopEntrySList
(
PSLIST_HEADER
list
,
PKSPIN_LOCK
lock
)
PSLIST_ENTRY
WINAPI
NTOSKRNL_ExInterlockedPopEntrySList
(
PSLIST_HEADER
list
,
PKSPIN_LOCK
lock
)
#endif
{
{
return
RtlInterlockedPopEntrySList
(
list
);
return
RtlInterlockedPopEntrySList
(
list
);
}
}
/***********************************************************************
/***********************************************************************
* ExInterlockedPushEntrySList (NTOSKRNL.EXE.@)
* ExInterlockedPushEntrySList (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL3_ENTRYPOINT
DEFINE_FASTCALL_WRAPPER
(
NTOSKRNL_ExInterlockedPushEntrySList
,
12
)
DEFINE_FASTCALL3_ENTRYPOINT
(
NTOSKRNL_ExInterlockedPushEntrySList
)
PSLIST_ENTRY
WINAPI
DECLSPEC_HIDDEN
__regs_NTOSKRNL_ExInterlockedPushEntrySList
(
PSLIST_HEADER
list
,
PSLIST_ENTRY
entry
,
PKSPIN_LOCK
lock
)
#else
PSLIST_ENTRY
WINAPI
NTOSKRNL_ExInterlockedPushEntrySList
(
PSLIST_HEADER
list
,
PSLIST_ENTRY
entry
,
PKSPIN_LOCK
lock
)
PSLIST_ENTRY
WINAPI
NTOSKRNL_ExInterlockedPushEntrySList
(
PSLIST_HEADER
list
,
PSLIST_ENTRY
entry
,
PKSPIN_LOCK
lock
)
#endif
{
{
return
RtlInterlockedPushEntrySList
(
list
,
entry
);
return
RtlInterlockedPushEntrySList
(
list
,
entry
);
}
}
#endif
/* __i386__ */
#endif
/* _WIN64 */
/***********************************************************************
/***********************************************************************
* ExAcquireFastMutexUnsafe (NTOSKRNL.EXE.@)
* ExAcquireFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
ExAcquireFastMutexUnsafe
)
DEFINE_FASTCALL1_ENTRYPOINT
(
ExAcquireFastMutexUnsafe
)
void
WINAPI
__regs_ExAcquireFastMutexUnsafe
(
FAST_MUTEX
*
mutex
)
#else
void
WINAPI
ExAcquireFastMutexUnsafe
(
FAST_MUTEX
*
mutex
)
void
WINAPI
ExAcquireFastMutexUnsafe
(
FAST_MUTEX
*
mutex
)
#endif
{
{
LONG
count
;
LONG
count
;
...
@@ -665,12 +632,8 @@ void WINAPI ExAcquireFastMutexUnsafe( FAST_MUTEX *mutex )
...
@@ -665,12 +632,8 @@ void WINAPI ExAcquireFastMutexUnsafe( FAST_MUTEX *mutex )
/***********************************************************************
/***********************************************************************
* ExReleaseFastMutexUnsafe (NTOSKRNL.EXE.@)
* ExReleaseFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_WRAPPER
(
ExReleaseFastMutexUnsafe
)
DEFINE_FASTCALL1_ENTRYPOINT
(
ExReleaseFastMutexUnsafe
)
void
WINAPI
__regs_ExReleaseFastMutexUnsafe
(
FAST_MUTEX
*
mutex
)
#else
void
WINAPI
ExReleaseFastMutexUnsafe
(
FAST_MUTEX
*
mutex
)
void
WINAPI
ExReleaseFastMutexUnsafe
(
FAST_MUTEX
*
mutex
)
#endif
{
{
LONG
count
;
LONG
count
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment