On 2010.08.17 12:55, Kai Tietz wrote: > Pete, > > could you provide us a list of the Interlock* API, which has stdcall > calling convention by our findings? Please just list names of those > functions and don't copy from VC's header-set. So we can adjust things > for win32 more easily without violating EULA.
Thanks for the speedy replies. As far as we are concerned, we only had InterlockedExchange and InterlockedIncrement being a problem, as these are the only 2 call from Interlocked API we use. The following is copied from MinGW32's winbase.h [1] which should work with your EULA. It looks like you might need to add some #ifdefs as well: #if !(__USE_NTOSKRNL__) /* CAREFUL: These are exported from ntoskrnl.exe and declared in winddk.h as __fastcall functions, but are exported from kernel32.dll as __stdcall */ #if (_WIN32_WINNT >= 0x0501) WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER); #endif #ifndef __INTERLOCKED_DECLARED #define __INTERLOCKED_DECLARED LONG WINAPI InterlockedCompareExchange(LONG volatile *,LONG,LONG); /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ #define InterlockedCompareExchangePointer(d,e,c) \ (PVOID)InterlockedCompareExchange((LONG volatile *)(d),(LONG)(e),(LONG)(c)) LONG WINAPI InterlockedDecrement(LONG volatile *); LONG WINAPI InterlockedExchange(LONG volatile *,LONG); /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ #define InterlockedExchangePointer(t,v) \ (PVOID)InterlockedExchange((LONG volatile *)(t),(LONG)(v)) LONG WINAPI InterlockedExchangeAdd(LONG volatile *,LONG); #if (_WIN32_WINNT >= 0x0501) PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER); #endif LONG WINAPI InterlockedIncrement(LONG volatile *); #if (_WIN32_WINNT >= 0x0501) PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER); PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY); #endif #endif /* __INTERLOCKED_DECLARED */ #endif /* __USE_NTOSKRNL__ */ Regards, /Pete [1] http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/winbase.h?rev=1.98&content-type=text/x-cvsweb-markup&cvsroot=src ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public