Re: glib/gatomic.c



On 13-03-09 04:23 AM, John Emmas wrote:

/* mingw32 does not have MemoryBarrier.
  * MemoryBarrier may be defined as a macro or a function.
  * Just make a failsafe version for ourselves. */
#ifdef MemoryBarrier
#define _GMemoryBarrier MemoryBarrier
#else

static inline void _GMemoryBarrier (void) {
   long dummy = 0;
   InterlockedExchange (&dummy, 1);
}
#endif

Unfortunately, for MSVC, the 'inline' keyword is only available when building
as C++.  For standard 'C' we need to use '__inline'.

Hi Behdad,

I just updated to the latest code for gatomic.c.  Although those "#pragma
instrinsics" seem to be included now, I'm still getting an error from MSVC
about the "inline" keyword (which it doesn't recognise).  It expects
'__inline'.  Is that something you're still working on?

Humm.  I thought I removed the MemoryBarrier fallback completely.  Where are
you seeing inline?

I'm still trying to get my head around this...

behdad

I found that the simplest fix was just to #include "gutils.h". Thanks.

John
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


-- 
behdad
http://behdad.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]