navaraf@cvs.reactos.com wrote:
CVSROOT: /CVS/ReactOS Module name: reactos Repository: reactos/w32api/include/ddk/ Changes by: navaraf@mok.osexperts.com 04/10/17 06:08:27
Modified files: reactos/include/ddk/: exfuncs.h reactos/ntoskrnl/ex/: interlck.c list.c reactos/ntoskrnl/: ntoskrnl.def reactos/w32api/include/ddk/: winddk.h
Log message:
- Fix calling convention of ExInterlocked* functions.
Ros-cvs mailing list Ros-cvs@reactos.com http://reactos.com/mailman/listinfo/ros-cvs
Hi,
Please reverse this change. ExInterlocked* functions are FASTCALL, as previously defined.
Best regards, Alex Ionescu
Alex Ionescu wrote:
Hi,
Please reverse this change. ExInterlocked* functions are FASTCALL, as previously defined.
Some are, some aren't! If you were looking in the DDK headers you'll see
#define ExInterlockedXxx ExfInterlockedXxx ... ULONG DDKFASTAPI ExInterlockedXxx(...);
which is confusing, but trust me I got the prototypes right.
Regards, Filip
Filip Navara wrote:
Alex Ionescu wrote:
Hi,
Please reverse this change. ExInterlocked* functions are FASTCALL, as previously defined.
Some are, some aren't! If you were looking in the DDK headers you'll see
#define ExInterlockedXxx ExfInterlockedXxx ... ULONG DDKFASTAPI ExInterlockedXxx(...);
which is confusing, but trust me I got the prototypes right.
If you were looking in the DDK headers you'll see:
NTKERNELAPI ULONG FASTCALL ExInterlockedAddUlong ( IN PULONG Addend, IN ULONG Increment, IN PKSPIN_LOCK Lock );
after your change our headers have:
ULONG STDCALL ExInterlockedAddUlong (PULONG Addend, ULONG Increment, PKSPIN_LOCK Lock)
I was however stupid in assuming all the STDCALL incorrections were your fault, it seems they were there before (except this one which you've done).
Anyways, the defintions are wrong and should be changed to FASTCALL, (the ones which are). The others should be macros in winddk.h which point to the fastcall versions. I haven't seen any STDCALL Ex functions in NTOSKRNL, please point them out to me.
I'm sorry for putting all the blame on you, I noticed you correctly changed some to FASTCALL in list.c.
Best regards, Alex Ionescu
Regards, Filip _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Alex Ionescu wrote:
Filip Navara wrote:
Alex Ionescu wrote:
Hi,
Please reverse this change. ExInterlocked* functions are FASTCALL, as previously defined.
Some are, some aren't! If you were looking in the DDK headers you'll see
#define ExInterlockedXxx ExfInterlockedXxx ... ULONG DDKFASTAPI ExInterlockedXxx(...);
which is confusing, but trust me I got the prototypes right.
If you were looking in the DDK headers you'll see:
NTKERNELAPI ULONG FASTCALL ExInterlockedAddUlong ( IN PULONG Addend, IN ULONG Increment, IN PKSPIN_LOCK Lock );
You missed the line #define ExInterlockedAddUlong ExfInterlockedAddUlong in MS ntddk.h so the declaration you're showing expands to
NTKERNELAPI ULONG FASTCALL ExfInterlockedAddUlong ( IN PULONG Addend, IN ULONG Increment, IN PKSPIN_LOCK Lock );
really, which is correct.
Regards, Filip
Alex Ionescu wrote: [snip]
I haven't seen any STDCALL Ex functions in NTOSKRNL, please point them out to me.
[snip]
ExInterlockedFlushSList -> FASTCALL ExInterlockedPopEntrySList -> FASTCALL ExInterlockedPushEntrySList -> FASTCALL
ExfInterlockedInsertHeadList -> FASTCALL ExInterlockedInsertHeadList -> STDCALL ExfInterlockedInsertTailList -> FASTCALL ExInterlockedInsertTailList -> STDCALL ExfInterlockedRemoveHeadList -> FASTCALL ExInterlockedRemoveHeadList -> STDCALL ExfInterlockedPopEntryList -> FASTCALL ExInterlockedPopEntryList -> STDCALL ExfInterlockedPushEntryList -> FASTCALL ExInterlockedPushEntryList -> STDCALL
ExfInterlockedAddUlong -> FASTCALL ExInterlockedAddUlong -> STDCALL
Exfi386InterlockedIncrementLong -> FASTCALL Exi386InterlockedIncrementLong -> STDCALL Exfi386InterlockedDecrementLong -> FASTCALL Exi386InterlockedDecrementLong -> STDCALL Exfi386InterlockedExchangeUlong -> FASTCALL Exi386InterlockedExchangeUlong -> STDCALL
ExfInterlockedCompareExchange64 -> FASTCALL ExInterlockedCompareExchange64 -> !FASTCALL!
ExInterlockedAddLargeInteger -> STDCALL ExInterlockedIncrementLong -> STDCALL ExInterlockedDecrementLong -> STDCALL ExInterlockedExchangeUlong -> STDCALL
ExInterlockedAddLargeStatistic -> FASTCALL
ExInterlockedExtendZone -> STDCALL
Regards, Filip