For 32 bit, the current MinGW-w64 winbase has:

   LONG InterlockedIncrement(LONG volatile *lpAddend);
   LONG InterlockedDecrement(LONG volatile *lpAddend);
   LONG InterlockedExchange(LONG volatile *Target,LONG Value);

However, MinGW32 uses:

   LONG WINAPI InterlockedDecrement(LONG volatile *);
   LONG WINAPI InterlockedExchange(LONG volatile *,LONG);
   LONG WINAPI InterlockedIncrement(LONG volatile *);

The lack of WINAPI qualifier in MinGW-w64 results in MinGW-w64 32 bit 
objects lacking the __stdcall decoration (eg. '_interlockedexcha...@8'), 
which means that a 32 bit MinGW-w64 generated library using any of the 
Interlocked calls above cannot be used with MinGW32 environment.

You might also want to note the following from the MinGW32 header 
regarding the Interlocked API section:

/* CAREFUL: These are exported from ntoskrnl.exe and declared in 
winddk.h as __fastcall functions, but are exported from kernel32.dll as 
__stdcall */

Regards,

/Pete





------------------------------------------------------------------------------
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

Reply via email to