]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(MEMORY_BARRIER): Define.
authorUlrich Drepper <drepper@redhat.com>
Thu, 17 Jan 2002 00:41:15 +0000 (00:41 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 17 Jan 2002 00:41:15 +0000 (00:41 +0000)
(CURRENT_STACK_FRAME): Remove duplicate definition.

linuxthreads/sysdeps/s390/s390-32/pt-machine.h
linuxthreads/sysdeps/s390/s390-64/pt-machine.h

index 3afc9d5d609c2c0b19019a4bad6e5fdd02588a27..f84ccdfc9032372da190715f4217ad7d350b2a75 100644 (file)
 # define PT_EI extern inline
 #endif
 
+/* For multiprocessor systems, we want to ensure all memory accesses
+   are completed before we reset a lock.  On other systems, we still
+   need to make sure that the compiler has flushed everything to memory.  */
+#define MEMORY_BARRIER() __asm__ __volatile__ ("bcr 15,0" : : : "memory")
+
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)
@@ -94,9 +99,3 @@ __compare_and_swap(long int *p, long int oldval, long int newval)
         return retval == 0;
 }
 
-
-
-/* Get some notion of the current stack.  Need not be exactly the top
-   of the stack, just something somewhere in the current frame.  */
-#define CURRENT_STACK_FRAME  stack_pointer
-register char * stack_pointer __asm__ ("%r15");
index f205c1245ce7d0f42e04ddc475105babea3eb51b..8b123352d99ceb730f88c09f5dede7fc6c11660d 100644 (file)
 # define PT_EI extern inline
 #endif
 
+/* For multiprocessor systems, we want to ensure all memory accesses
+   are completed before we reset a lock.  On other systems, we still
+   need to make sure that the compiler has flushed everything to memory.  */
+#define MEMORY_BARRIER() __asm__ __volatile__ ("bcr 15,0" : : : "memory")
+
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)
@@ -99,9 +104,3 @@ __compare_and_swap(long int *p, long int oldval, long int newval)
         return retval == 0;
 }
 
-
-
-/* Get some notion of the current stack.  Need not be exactly the top
-   of the stack, just something somewhere in the current frame.  */
-#define CURRENT_STACK_FRAME  stack_pointer
-register char * stack_pointer __asm__ ("%r15");