Jelajahi Sumber

gcc says
spinlock.c:35: warning: matching constraint does not allow a register

Update the asm to match glibc.

Joakim Tjernlund 19 tahun lalu
induk
melakukan
4227fc98fe
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      libpthread/linuxthreads/spinlock.c

+ 1 - 1
libpthread/linuxthreads/spinlock.c

@@ -32,7 +32,7 @@ static inline void __pthread_release(int * spinlock)
 {
   WRITE_MEMORY_BARRIER();
   *spinlock = __LT_SPINLOCK_INIT;
-  __asm __volatile ("" : "=m" (*spinlock) : "0" (*spinlock));
+  __asm __volatile ("" : "=m" (*spinlock) : "m" (*spinlock));
 }