]> sourceware.org Git - newlib-cygwin.git/commitdiff
* mingwex/membarrier.c: New file.
authorEarnie Boyd <earnie@users.sf.net>
Mon, 6 Aug 2012 18:05:53 +0000 (18:05 +0000)
committerEarnie Boyd <earnie@users.sf.net>
Mon, 6 Aug 2012 18:05:53 +0000 (18:05 +0000)
* mingwex/Makefile.in (DISTFILES): Add membarrier.c.
(REPLACE_OBJS): Add membarrier.o.

winsup/mingw/ChangeLog
winsup/mingw/mingwex/Makefile.in
winsup/mingw/mingwex/membarrier.c [new file with mode: 0644]

index 38ac9504d131147179bf1c02f162f6342df8f561..d0667f7c30f16a3852979206ad601a8bb25e660b 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-06  Earnie Boyd  <earnie@users.sourceforge.net>
+
+       * mingwex/membarrier.c: New file.
+       * mingwex/Makefile.in (DISTFILES): Add membarrier.c.
+       (REPLACE_OBJS): Add membarrier.o.
+
 2012-08-02  Ivan Maidanski  <ivmai@users.sourceforge.net>
 
        * include/process.h (_wexec*, _wspawn*): Declare.
index 59ebac7e3fbee8ff01b8efbeeee2ec74e0b3d5b5..afe32e5be8ad77e04d3953145cc7f5dfd8b516e2 100644 (file)
@@ -40,7 +40,7 @@ DISTFILES = \
        fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
        fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
        feupdateenv.c ftruncate.c fwide.c  getopt.c imaxabs.c imaxdiv.c \
-       lltoa.c lltow.c mbsinit.c mingw-aligned-malloc.c \
+       lltoa.c lltow.c mbsinit.c membarrier.c mingw-aligned-malloc.c \
        mingw-fseek.c sitest.c strtoimax.c strtoumax.c \
        testwmem.c tst-aligned-malloc.c ulltoa.c ulltow.c wcstof.c \
        wcstoimax.c wcstold.c wcstoumax.c wctrans.c wctype.c \
@@ -201,7 +201,7 @@ POSIX_OBJS = \
        dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o usleep.o \
        basename.o dirname.o tsearch.o twalk.o tdelete.o tfind.o
 REPLACE_OBJS = \
-       mingw-aligned-malloc.o mingw-fseek.o
+       membarrier.o mingw-aligned-malloc.o mingw-fseek.o
 COMPLEX_OBJS = \
        cabs.o cabsf.o cabsl.o cacos.o cacosf.o cacosl.o cacosh.o \
        cacoshf.o cacoshl.o carg.o cargf.o cargl.o casin.o casinf.o \
diff --git a/winsup/mingw/mingwex/membarrier.c b/winsup/mingw/mingwex/membarrier.c
new file mode 100644 (file)
index 0000000..b8da9f7
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ *  THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ *  This source code is offered for use in the public domain. You may
+ *  use, modify or distribute it freely.
+ *
+ *  This code is distributed in the hope that it will be useful but
+ *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ *  DISCLAIMED. This includes but is not limited to warranties of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+void __mingworg_MemoryBarrier(void);
+void __mingworg_MemoryBarrier(void)
+{
+    long Barrier = 0;
+    __asm__ __volatile__("xchgl %%eax,%0 "
+      :"=r" (Barrier));
+}
+
This page took 0.034915 seconds and 5 git commands to generate.