Enabled FASTCALL calling convention

svn path=/trunk/; revision=2048
This commit is contained in:
Eric Kohl 2001-07-06 21:32:43 +00:00
parent af1605f6f6
commit e575ed9544
5 changed files with 78 additions and 325 deletions

View file

@ -1,4 +1,4 @@
/* $Id: ntddk.h,v 1.23 2001/06/22 12:39:48 ekohl Exp $
/* $Id: ntddk.h,v 1.24 2001/07/06 21:31:30 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -19,12 +19,8 @@ extern "C"
/* INCLUDES ***************************************************************/
/* GCC can not handle __fastcall */
//#ifdef USE_FASTCALL
//#define FASTCALL __attribute__((fastcall))
//#else
#define FASTCALL STDCALL
//#endif
#define FASTCALL __attribute__((fastcall))
#define STATIC static
#include <ntos/types.h>

View file

@ -1,73 +1,6 @@
#ifndef _INCLUDE_DDK_SEFUNCS_H
#define _INCLUDE_DDK_SEFUNCS_H
/* $Id: sefuncs.h,v 1.13 2000/07/04 08:52:34 dwelch Exp $ */
NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
BOOLEAN STDCALL RtlValidAcl (PACL Acl);
NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
PSECURITY_DESCRIPTOR AbsSD,
PDWORD AbsSDSize,
PACL Dacl,
PDWORD DaclSize,
PACL Sacl,
PDWORD SaclSize,
PSID Owner,
PDWORD OwnerSize,
PSID Group,
PDWORD GroupSize);
NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
UCHAR SubAuthorityCount,
ULONG SubAuthority0,
ULONG SubAuthority1,
ULONG SubAuthority2,
ULONG SubAuthority3,
ULONG SubAuthority4,
ULONG SubAuthority5,
ULONG SubAuthority6,
ULONG SubAuthority7,
PSID *Sid);
ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
NTSTATUS STDCALL RtlCopySid (ULONG BufferLength, PSID Dest, PSID Src);
BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
PSID STDCALL RtlFreeSid (PSID Sid);
ULONG STDCALL RtlLengthSid (PSID Sid);
PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
BOOLEAN STDCALL RtlValidSid (PSID Sid);
NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
/* $Id: sefuncs.h,v 1.14 2001/07/06 21:32:43 ekohl Exp $ */
BOOLEAN STDCALL SeAccessCheck (IN PSECURITY_DESCRIPTOR SecurityDescriptor,
IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext,

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.109 2001/07/04 20:40:20 chorns Exp $
; $Id: ntoskrnl.def,v 1.110 2001/07/06 21:30:59 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -15,7 +15,7 @@ DbgBreakPointWithStatus@4
;DbgLoadImageSymbols@12
DbgPrint
DbgPrompt@12
ExAcquireFastMutexUnsafe@4
@ExAcquireFastMutexUnsafe@4
ExAcquireResourceExclusive@8
ExAcquireResourceExclusiveLite@8
ExAcquireResourceSharedLite@8
@ -47,11 +47,9 @@ ExInitializeResource@4
ExInitializeResourceLite@4
ExInitializeZone@16
ExInterlockedAddLargeInteger@16
;@ExInterlockedAddLargeStatistic@8
ExInterlockedAddLargeStatistic@8
@ExInterlockedAddLargeStatistic@8
ExInterlockedAddUlong@12
;@ExInterlockedCompareExchange64@16
ExInterlockedCompareExchange64@16
@ExInterlockedCompareExchange64@16
ExInterlockedDecrementLong@8
ExInterlockedExchangeUlong@12
ExInterlockedExtendZone@16
@ -59,9 +57,9 @@ ExInterlockedIncrementLong@8
ExInterlockedInsertHeadList@12
ExInterlockedInsertTailList@12
ExInterlockedPopEntryList@8
ExInterlockedPopEntrySList@8
@ExInterlockedPopEntrySList@8
ExInterlockedPushEntryList@12
ExInterlockedPushEntrySList@12
@ExInterlockedPushEntrySList@12
ExInterlockedRemoveHeadList@8
ExIsProcessorFeaturePresent@4
ExIsResourceAcquiredExclusiveLite@4
@ -78,25 +76,25 @@ ExRaiseDatatypeMisalignment@0
ExRaiseStatus@4
ExRegisterCallback@12
ExReinitializeResourceLite@4
ExReleaseFastMutexUnsafe@4
@ExReleaseFastMutexUnsafe@4
ExReleaseResourceForThread@8
ExReleaseResourceForThreadLite@8
ExReleaseResourceLite@4
@ExReleaseResourceLite@4
ExSetResourceOwnerPointer@8
;ExSystemExceptionFilter
ExSystemTimeToLocalTime@8
ExTryToAcquireResourceExclusiveLite@4
ExUnregisterCallback@4
ExWindowStationObjectType DATA
;ExfInterlockedAddUlong
;ExfInterlockedInsertHeadList
;ExfInterlockedInsertTailList
;ExfInterlockedPopEntryList
;ExfInterlockedPushEntryList
;ExfInterlockedRemoveHeadList
;Exfi386InterlockedDecrementLong
;Exfi386InterlockedExchangeUlong
;Exfi386InterlockedIncrementLong
;@ExfInterlockedAddUlong
;@ExfInterlockedInsertHeadList
;@ExfInterlockedInsertTailList
;@ExfInterlockedPopEntryList
;@ExfInterlockedPushEntryList
;@ExfInterlockedRemoveHeadList
;@Exfi386InterlockedDecrementLong
;@Exfi386InterlockedExchangeUlong
;@Exfi386InterlockedIncrementLong
;Exi386InterlockedDecrementLong
;Exi386InterlockedExchangeUlong
;Exi386InterlockedIncrementLong
@ -186,16 +184,11 @@ FsRtlUninitializeMcb@4
FsRtlUninitializeOplock@4
HalDispatchTable DATA
HalPrivateDispatchTable DATA
;@InterlockedCompareExchange@12
InterlockedCompareExchange@12
;@InterlockedDecrement@4
InterlockedDecrement@4
;@InterlockedExchange@8
InterlockedExchange@8
;@InterlockedExchangeAdd@8
InterlockedExchangeAdd@8
;@InterlockedIncrement@4
InterlockedIncrement@4
@InterlockedCompareExchange@12
@InterlockedDecrement@4
@InterlockedExchange@8
@InterlockedExchangeAdd@8
@InterlockedIncrement@4
IoAcquireCancelSpinLock@4
IoAcquireVpbSpinLock@4
IoAdapterObjectType DATA
@ -302,10 +295,8 @@ IoVerifyVolume@8
IoWriteErrorLogEntry@4
IoWriteOperationCount DATA
IoWriteTransferCount DATA
;@IofCallDriver@8
IofCallDriver@8
;@IofCompleteRequest@8
IofCompleteRequest@8
@IofCallDriver@8
@IofCompleteRequest@8
KdDebuggerEnabled DATA
KdDebuggerNotPresent DATA
KdPollBreakIn@0
@ -405,13 +396,13 @@ KeSetImportanceDpc@8
;KeSetKernelStackSwapEnable
KeSetPriorityThread@8
;KeSetProfileIrql
;KeSetSwapContextNotifyRoutine
;@KeSetSwapContextNotifyRoutine
KeSetTargetProcessorDpc@8
;KeSetThreadSelectNotifyRoutine
;@KeSetThreadSelectNotifyRoutine
;KeSetTimeIncrement
KeSetTimer@16
KeSetTimerEx@20
;KeSetTimeUpdateNotifyRoutine
;@KeSetTimeUpdateNotifyRoutine
KeSynchronizeExecution@12
;KeTerminateThread
;KeTickCount DATA
@ -420,16 +411,16 @@ KeSynchronizeExecution@12
KeWaitForMultipleObjects@32
KeWaitForMutexObject@20
KeWaitForSingleObject@20
;KefAcquireSpinLockAtDpcLevel
;KefReleaseSpinLockFromDpcLevel
;@KefAcquireSpinLockAtDpcLevel
;@KefReleaseSpinLockFromDpcLevel
;Kei386EoiHelper
;KiAcquireSpinLock@4
;@KiAcquireSpinLock@4
;KiBugCheckData DATA
;KiCoprocessorError@0
KiDeliverApc@12
KiDispatchInterrupt@0
;KiIpiServiceRoutine@8
;KiReleaseSpinLock@4
;@KiReleaseSpinLock@4
;KiUnexpectedInterrupt
;Kii386SpinOnSpinLock
LdrAccessResource@16
@ -560,8 +551,8 @@ ObOpenObjectByName@28
ObOpenObjectByPointer@28
;ObQueryNameString@16
;ObQueryObjectAuditingByHandle@8
ObfDereferenceObject@4
ObfReferenceObject@4
@ObfDereferenceObject@4
@ObfReferenceObject@4
ObReferenceObjectByHandle@24
ObReferenceObjectByName@32
ObReferenceObjectByPointer@16
@ -1012,9 +1003,9 @@ wctomb
; exports from hal.dll
;
;
ExAcquireFastMutex@4
ExReleaseFastMutex@4
ExTryToAcquireFastMutex@4
@ExAcquireFastMutex@4
@ExReleaseFastMutex@4
@ExTryToAcquireFastMutex@4
HalAcquireDisplayOwnership@4
HalAdjustResourceList@4
HalAllProcessorsStarted@0
@ -1025,7 +1016,6 @@ HalAssignSlotResources@32
HalBeginSystemInterrupt@12
HalCalibratePerformanceCounter@4
;@HalClearSoftwareInterrupt@4
;HalClearSoftwareInterrupt@4
HalDisableSystemInterrupt@8
HalDisplayString@4
HalEnableSystemInterrupt@12
@ -1048,7 +1038,6 @@ HalReadDmaCounter@4
HalReportResourceUsage@0
HalRequestIpi@4
;@HalRequestSoftwareInterrupt@4
;HalRequestSoftwareInterrupt@4
HalReturnToFirmware@4
HalSetBusData@20
HalSetBusDataByOffset@24
@ -1060,7 +1049,7 @@ HalSetRealTimeClock@4
HalStartNextProcessor@8
;HalStartProfileInterrupt@4
;HalStopProfileInterrupt@4
HalSystemVectorDispatchEntry@12
@HalSystemVectorDispatchEntry@12
HalTranslateBusAddress@24
IoAssignDriveLetters@16
IoFlushAdapterBuffers@24
@ -1099,8 +1088,7 @@ KdPortPutByte@4
KdPortRestore@0
KdPortSave@0
KeAcquireSpinLock@8
;@KeAcquireSpinLockRaiseToSynch@4
KeAcquireSpinLockRaiseToSynch@4
@KeAcquireSpinLockRaiseToSynch@4
KeFlushWriteBuffer@0
KeGetCurrentIrql@0
KeLowerIrql@4
@ -1110,14 +1098,10 @@ KeRaiseIrqlToDpcLevel@0
KeRaiseIrqlToSynchLevel@0
KeReleaseSpinLock@8
KeStallExecutionProcessor@4
;@KfAcquireSpinLock@4
KfAcquireSpinLock@4
;@KfLowerIrql@4
KfLowerIrql@4
;@KfRaiseIrql@4
KfRaiseIrql@4
;@KfReleaseSpinLock@8
KfReleaseSpinLock@8
@KfAcquireSpinLock@4
@KfLowerIrql@4
@KfRaiseIrql@4
@KfReleaseSpinLock@8
READ_PORT_BUFFER_UCHAR@12
READ_PORT_BUFFER_ULONG@12
READ_PORT_BUFFER_USHORT@12

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.95 2001/06/16 14:05:29 ekohl Exp $
; $Id: ntoskrnl.edf,v 1.96 2001/07/06 21:30:59 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -15,7 +15,7 @@ DbgBreakPointWithStatus=DbgBreakPointWithStatus@4
;DbgLoadImageSymbols=DbgLoadImageSymbols@12
DbgPrint
DbgPrompt=DbgPrompt@12
ExAcquireFastMutexUnsafe=ExAcquireFastMutexUnsafe@4
ExAcquireFastMutexUnsafe=@ExAcquireFastMutexUnsafe@4
ExAcquireResourceExclusive=ExAcquireResourceExclusive@8
ExAcquireResourceExclusiveLite=ExAcquireResourceExclusiveLite@8
ExAcquireResourceSharedLite=ExAcquireResourceSharedLite@8
@ -47,11 +47,9 @@ ExInitializeResource=ExInitializeResource@4
ExInitializeResourceLite=ExInitializeResourceLite@4
ExInitializeZone=ExInitializeZone@16
ExInterlockedAddLargeInteger=ExInterlockedAddLargeInteger@16
;ExInterlockedAddLargeStatistic=@ExInterlockedAddLargeStatistic@8
ExInterlockedAddLargeStatistic=ExInterlockedAddLargeStatistic@8
ExInterlockedAddLargeStatistic=@ExInterlockedAddLargeStatistic@8
ExInterlockedAddUlong=ExInterlockedAddUlong@12
;ExInterlockedCompareExchange64=@ExInterlockedCompareExchange64@16
ExInterlockedCompareExchange64=ExInterlockedCompareExchange64@16
ExInterlockedCompareExchange64=@ExInterlockedCompareExchange64@16
ExInterlockedDecrementLong=ExInterlockedDecrementLong@8
ExInterlockedExchangeUlong=ExInterlockedExchangeUlong@12
ExInterlockedExtendZone=ExInterlockedExtendZone@16
@ -59,9 +57,9 @@ ExInterlockedIncrementLong=ExInterlockedIncrementLong@8
ExInterlockedInsertHeadList=ExInterlockedInsertHeadList@12
ExInterlockedInsertTailList=ExInterlockedInsertTailList@12
ExInterlockedPopEntryList=ExInterlockedPopEntryList@8
ExInterlockedPopEntrySList=ExInterlockedPopEntrySList@8
ExInterlockedPopEntrySList=@ExInterlockedPopEntrySList@8
ExInterlockedPushEntryList=ExInterlockedPushEntryList@12
ExInterlockedPushEntrySList=ExInterlockedPushEntrySList@12
ExInterlockedPushEntrySList=@ExInterlockedPushEntrySList@12
ExInterlockedRemoveHeadList=ExInterlockedRemoveHeadList@8
ExIsProcessorFeaturePresent=ExIsProcessorFeaturePresent@4
ExIsResourceAcquiredExclusiveLite=ExIsResourceAcquiredExclusiveLite@4
@ -78,10 +76,10 @@ ExRaiseDatatypeMisalignment=ExRaiseDatatypeMisalignment@0
ExRaiseStatus=ExRaiseStatus@4
ExRegisterCallback=ExRegisterCallback@12
ExReinitializeResourceLite=ExReinitializeResourceLite@4
ExReleaseFastMutexUnsafe=ExReleaseFastMutexUnsafe@4
ExReleaseFastMutexUnsafe=@ExReleaseFastMutexUnsafe@4
ExReleaseResourceForThread=ExReleaseResourceForThread@8
ExReleaseResourceForThreadLite=ExReleaseResourceForThreadLite@8
ExReleaseResourceLite=ExReleaseResourceLite@4
ExReleaseResourceLite=@ExReleaseResourceLite@4
ExSetResourceOwnerPointer=ExSetResourceOwnerPointer@8
;ExSystemExceptionFilter
ExSystemTimeToLocalTime=ExSystemTimeToLocalTime@8
@ -186,16 +184,11 @@ FsRtlUninitializeMcb=FsRtlUninitializeMcb@4
FsRtlUninitializeOplock=FsRtlUninitializeOplock@4
HalDispatchTable DATA
HalPrivateDispatchTable DATA
;InterlockedCompareExchange=@InterlockedCompareExchange@12
InterlockedCompareExchange=InterlockedCompareExchange@12
;InterlockedDecrement=@InterlockedDecrement@4
InterlockedDecrement=InterlockedDecrement@4
;InterlockedExchange=@InterlockedExchange@8
InterlockedExchange=InterlockedExchange@8
;InterlockedExchangeAdd=@InterlockedExchangeAdd@8
InterlockedExchangeAdd=InterlockedExchangeAdd@8
;InterlockedIncrement=@InterlockedIncrement@4
InterlockedIncrement=InterlockedIncrement@4
InterlockedCompareExchange=@InterlockedCompareExchange@12
InterlockedDecrement=@InterlockedDecrement@4
InterlockedExchange=@InterlockedExchange@8
InterlockedExchangeAdd=@InterlockedExchangeAdd@8
InterlockedIncrement=@InterlockedIncrement@4
IoAcquireCancelSpinLock=IoAcquireCancelSpinLock@4
IoAcquireVpbSpinLock=IoAcquireVpbSpinLock@4
IoAdapterObjectType DATA
@ -302,10 +295,8 @@ IoVerifyVolume=IoVerifyVolume@8
IoWriteErrorLogEntry=IoWriteErrorLogEntry@4
IoWriteOperationCount DATA
IoWriteTransferCount DATA
;IofCallDriver=@IofCallDriver@0
IofCallDriver=IofCallDriver@8
;IofCompleteRequest=@IofCompleteRequest@0
IofCompleteRequest=IofCompleteRequest@8
IofCallDriver=@IofCallDriver@8
IofCompleteRequest=@IofCompleteRequest@8
KdDebuggerEnabled DATA
KdDebuggerNotPresent DATA
KdPollBreakIn=KdPollBreakIn@0
@ -560,8 +551,8 @@ ObOpenObjectByName=ObOpenObjectByName@28
ObOpenObjectByPointer=ObOpenObjectByPointer@28
;ObQueryNameString=ObQueryNameString@16
;ObQueryObjectAuditingByHandle=ObQueryObjectAuditingByHandle@8
ObfDereferenceObject=ObfDereferenceObject@4
ObfReferenceObject=ObfReferenceObject@4
ObfDereferenceObject=@ObfDereferenceObject@4
ObfReferenceObject=@ObfReferenceObject@4
ObReferenceObjectByHandle=ObReferenceObjectByHandle@24
ObReferenceObjectByName=ObReferenceObjectByName@32
ObReferenceObjectByPointer=ObReferenceObjectByPointer@16
@ -1010,9 +1001,9 @@ wctomb
; exports from hal.dll
;
;
ExAcquireFastMutex=ExAcquireFastMutex@4
ExReleaseFastMutex=ExReleaseFastMutex@4
ExTryToAcquireFastMutex=ExTryToAcquireFastMutex@4
ExAcquireFastMutex=@ExAcquireFastMutex@4
ExReleaseFastMutex=@ExReleaseFastMutex@4
ExTryToAcquireFastMutex=@ExTryToAcquireFastMutex@4
HalAcquireDisplayOwnership=HalAcquireDisplayOwnership@4
HalAdjustResourceList=HalAdjustResourceList@4
HalAllProcessorsStarted=HalAllProcessorsStarted@0
@ -1023,7 +1014,6 @@ HalAssignSlotResource=HalAssignSlotResources@32
HalBeginSystemInterrupt=HalBeginSystemInterrupt@12
HalCalibratePerformanceCounter=HalCalibratePerformanceCounter@4
;HalClearSoftwareInterrupt=@HalClearSoftwareInterrupt@4
;HalClearSoftwareInterrupt=HalClearSoftwareInterrupt@4
HalDisableSystemInterrupt=HalDisableSystemInterrupt@8
HalDisplayString=HalDisplayString@4
HalEnableSystemInterrupt=HalEnableSystemInterrupt@12
@ -1046,7 +1036,6 @@ HalReadDmaCounter=HalReadDmaCounter@4
HalReportResourceUsage=HalReportResourceUsage@0
HalRequestIpi=HalRequestIpi@4
;HalRequestSoftwareInterrupt=@HalRequestSoftwareInterrupt@4
;HalRequestSoftwareInterrupt=HalRequestSoftwareInterrupt@4
HalReturnToFirmware=HalReturnToFirmware@4
HalSetBusData=HalSetBusData@20
HalSetBusDataByOffset=HalSetBusDataByOffset@24
@ -1058,8 +1047,7 @@ HalSetRealTimeClock=HalSetRealTimeClock@4
HalStartNextProcessor=HalStartNextProcessor@8
;HalStartProfileInterrupt=HalStartProfileInterrupt@4
;HalStopProfileInterrupt=HalStopProfileInterrupt@4
;HalSystemVectorDispatchEntry=@HalSystemVectorDispatchEntry@12
HalSystemVectorDispatchEntry=HalSystemVectorDispatchEntry@12
HalSystemVectorDispatchEntry=@HalSystemVectorDispatchEntry@12
HalTranslateBusAddress=HalTranslateBusAddress@24
IoAssignDriveLetters=IoAssignDriveLetters@16
IoFlushAdapterBuffers=IoFlushAdapterBuffers@24
@ -1098,8 +1086,7 @@ KdPortPutByte=KdPortPutByte@4
KdPortRestore=KdPortRestore@0
KdPortSave=KdPortSave@0
KeAcquireSpinLock=KeAcquireSpinLock@8
;KeAcquireSpinLockRaiseToSynch=@KeAcquireSpinLockRaiseToSynch@4
KeAcquireSpinLockRaiseToSynch=KeAcquireSpinLockRaiseToSynch@4
KeAcquireSpinLockRaiseToSynch=@KeAcquireSpinLockRaiseToSynch@4
KeFlushWriteBuffer=KeFlushWriteBuffer@0
KeGetCurrentIrql=KeGetCurrentIrql@0
KeLowerIrql=KeLowerIrql@4
@ -1109,14 +1096,10 @@ KeRaiseIrqlToDpcLevel=KeRaiseIrqlToDpcLevel@0
KeRaiseIrqlToSynchLevel=KeRaiseIrqlToSynchLevel@0
KeReleaseSpinLock=KeReleaseSpinLock@8
KeStallExecutionProcessor=KeStallExecutionProcessor@4
;KfAcquireSpinLock=@KfAcquireSpinLock@4
KfAcquireSpinLock=KfAcquireSpinLock@4
;KfLowerIrql=@KfLowerIrql@4
KfLowerIrql=KfLowerIrql@4
;KfRaiseIrql=@KfRaiseIrql@4
KfRaiseIrql=KfRaiseIrql@4
;KfReleaseSpinLock=@KfReleaseSpinLock@8
KfReleaseSpinLock=KfReleaseSpinLock@8
KfAcquireSpinLock=@KfAcquireSpinLock@4
KfLowerIrql=@KfLowerIrql@4
KfRaiseIrql=@KfRaiseIrql@4
KfReleaseSpinLock=@KfReleaseSpinLock@8
READ_PORT_BUFFER_UCHAR=READ_PORT_BUFFER_UCHAR@12
READ_PORT_BUFFER_ULONG=READ_PORT_BUFFER_ULONG@12
READ_PORT_BUFFER_USHORT=READ_PORT_BUFFER_USHORT@12

View file

@ -1,89 +1,13 @@
/* $Id: interlck.c,v 1.8 2001/06/20 20:00:36 ekohl Exp $
/* $Id: interlck.c,v 1.9 2001/07/06 21:30:33 ekohl Exp $
*
* reactos/ntoskrnl/rtl/interlck.c
*
* FIXME: change decorated names when __fastcall will be available
* (for both egcs 1.1.2 and gcc 2.95 FASTCALL == STDCALL).
*/
#include <reactos/config.h>
#include <ntos.h>
#include <internal/debug.h>
//#define USE_FASTCALL
#if 0
LONG FASTCALL InterlockedIncrement(PLONG Addend)
{
LONG r;
(*Addend)++;
r = (*Addend);
return(r);
}
LONG FASTCALL InterlockedDecrement(PLONG Addend)
{
LONG r;
(*Addend)--;
r = (*Addend);
return(r);
}
#endif
#ifdef I386_FIX
LONG FASTCALL InterlockedIncrement (PLONG Addend)
{
*Addend = *Addend + 1;
return *Addend;
}
LONG FASTCALL InterlockedDecrement (PLONG Addend)
{
*Addend = *Addend - 1;
return *Addend;
}
LONG
FASTCALL
InterlockedExchange (
PLONG Target,
LONG Value
)
{
LONG Val = *Target;
*Target = Value;
return Val;
}
LONG
FASTCALL
InterlockedExchangeAdd (
PLONG Addend,
LONG Value
)
{
LONG Val = *Addend;
*Addend = Value;
return Val;
}
PVOID
FASTCALL
InterlockedCompareExchange (
PVOID * Destination,
PVOID Exchange,
PVOID Comperand
)
{
LONG Val = *((LONG*)Destination);
if (*((LONG*)Destination) == (LONG)Comperand) {
*((LONG*)Destination) = (LONG)Exchange;
}
return (PVOID)Val;
}
#else /* I386_FIX */
#define USE_FASTCALL
/**********************************************************************
* FASTCALL: @InterlockedIncrement@4
@ -99,28 +23,13 @@ InterlockedIncrement(PLONG Addend);
* RETURNS: The incremented value
*/
#ifndef USE_FASTCALL
__asm__("\n\t.global _InterlockedIncrement@4\n\t"
"_InterlockedIncrement@4:\n\t"
"pushl %ebp\n\t"
"movl %esp,%ebp\n\t"
"pushl %ebx\n\t"
"movl $1,%eax\n\t"
"movl 8(%ebp),%ebx\n\t"
"xaddl %eax,(%ebx)\n\t"
"incl %eax\n\t"
"popl %ebx\n\t"
"movl %ebp,%esp\n\t"
"popl %ebp\n\t"
"ret $4\n\t");
#else
__asm__("\n\t.global @InterlockedIncrement@4\n\t"
"@InterlockedIncrement@4:\n\t"
"movl $1,%eax\n\t"
"xaddl %eax,(%ecx)\n\t"
"incl %eax\n\t"
"ret\n\t");
#endif
/**********************************************************************
* FASTCALL: @InterlockedDecrement@4
@ -129,28 +38,13 @@ __asm__("\n\t.global @InterlockedIncrement@4\n\t"
LONG FASTCALL
InterlockedDecrement(PLONG Addend);
#ifndef USE_FASTCALL
__asm__("\n\t.global _InterlockedDecrement@4\n\t"
"_InterlockedDecrement@4:\n\t"
"pushl %ebp\n\t"
"movl %esp,%ebp\n\t"
"pushl %ebx\n\t"
"movl $-1,%eax\n\t"
"movl 8(%ebp),%ebx\n\t"
"xaddl %eax,(%ebx)\n\t"
"decl %eax\n\t"
"popl %ebx\n\t"
"movl %ebp,%esp\n\t"
"popl %ebp\n\t"
"ret $4\n\t");
#else
__asm__("\n\t.global @InterlockedDecrement@4\n\t"
"@InterlockedDecrement@4:\n\t"
"movl $-1,%eax\n\t"
"xaddl %eax,(%ecx)\n\t"
"decl %eax\n\t"
"ret\n\t");
#endif
/**********************************************************************
* FASTCALL: @InterlockedExchange@8
@ -161,78 +55,41 @@ LONG FASTCALL
InterlockedExchange(PLONG Target,
LONG Value);
#ifndef USE_FASTCALL
__asm__("\n\t.global _InterlockedExchange@8\n\t"
"_InterlockedExchange@8:\n\t"
"pushl %ebp\n\t"
"movl %esp,%ebp\n\t"
"pushl %ebx\n\t"
"movl 12(%ebp),%eax\n\t"
"movl 8(%ebp),%ebx\n\t"
"xchgl %eax,(%ebx)\n\t"
"popl %ebx\n\t"
"movl %ebp,%esp\n\t"
"popl %ebp\n\t"
"ret $8\n\t");
#else
__asm__("\n\t.global @InterlockedExchange@8\n\t"
"@InterlockedExchange@8:\n\t"
"movl (%ecx),%eax\n"
"xchgl %edx,(%ecx)\n\t"
"ret\n\t");
#endif
/**********************************************************************
* FASTCALL: @InterlockedExchangeAdd@8
* STDCALL : _InterlockedExchangeAdd@8
* STDCALL: _InterlockedExchangeAdd@8
*/
LONG FASTCALL
InterlockedExchangeAdd(PLONG Addend,
LONG Value);
#ifndef USE_FASTCALL
__asm__("\n\t.global _InterlockedExchangeAdd@8\n\t"
"_InterlockedExchangeAdd@8:\n\t"
"movl 8(%esp),%eax\n\t"
"movl 4(%esp),%ebx\n\t"
"xaddl %eax,(%ebx)\n\t"
"ret $8\n\t");
#else
__asm__("\n\t.global @InterlockedExchangeAdd@8\n\t"
"@InterlockedExchangeAdd@8:\n\t"
"xaddl %edx,(%ecx)\n\t"
"movl %edx,%eax\n\t"
"ret\n\t");
#endif
/**********************************************************************
* FASTCALL: @InterlockedCompareExchange@12
* STDCALL : _InterlockedCompareExchange@12
* STDCALL: _InterlockedCompareExchange@12
*/
PVOID FASTCALL
InterlockedCompareExchange(PVOID *Destination,
PVOID Exchange,
PVOID Comperand);
#ifndef USE_FASTCALL
__asm__("\n\t.global _InterlockedCompareExchange@12\n\t"
"_InterlockedCompareExchange@12:\n\t"
"movl 12(%esp),%eax\n\t"
"movl 8(%esp),%edx\n\t"
"movl 4(%esp),%ebx\n\t"
"cmpxchg %edx,(%ebx)\n\t"
"movl %edx,%eax\n\t"
"ret $12\n\t");
#else
__asm__("\n\t.global @InterlockedCompareExchange@12\n\t"
"@InterlockedCompareExchange@12:\n\t"
"movl 4(%esp),%eax\n\t"
"cmpxchg %edx,(%ecx)\n\t"
"ret $4\n\t");
#endif
#endif /* I386_FIX */
/* EOF */