This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi! From what I saw in spinlock.c, you do not expect only the Store->Store barrier but Load->Load as well. 2000-04-17 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Make sure all stores before MEMORY_BARRIER complete before all stores after it and similarly with loads. --- libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h.jj Thu Apr 13 09:25:32 2000 +++ libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h Mon Apr 17 12:43:34 2000 @@ -37,10 +37,9 @@ testandset (int *spinlock) } -/* Memory barrier; default is to do nothing */ -/* FIXME: is stbar OK, or should we use the more general membar instruction? - If so, which mode to pass to membar? */ -#define MEMORY_BARRIER() __asm__ __volatile__("stbar" : : : "memory") +/* Memory barrier; guarantee stores before this are completed before new stores + and similarly with loads. */ +#define MEMORY_BARRIER() __asm__ __volatile__("membar 9" : : : "memory") /* Get some notion of the current stack. Need not be exactly the top Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |