PERFORCE change 32113 for review

Peter Wemm peter at FreeBSD.org
Fri May 30 12:47:19 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=32113

Change 32113 by peter at peter_hammer on 2003/05/30 12:47:01

	clean up locking code, again thanks to jhb.

Affected files ...

.. //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#4 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#4 (text+ko) ====

@@ -72,27 +72,27 @@
  */
 #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
     do { \
-        asm("1:     movl (%1),%%eax;" \
+        asm("1:     movl %1,%%eax;" \
             "movl   %%eax,%%edx;" \
             "andl   %2,%%edx;" \
             "btsl   $0x1,%%edx;" \
             "adcl   $0x0,%%edx;" \
-            "lock;  cmpxchgl %%edx,(%1);" \
+            "lock;  cmpxchgl %%edx,%1;" \
             "jnz    1b;" \
             "cmpb   $0x3,%%dl;" \
             "sbbl   %%eax,%%eax" \
-            : "=a" (Acq), "+c" (GLptr) : "i" (~1L) : "edx"); \
+            : "=a" (Acq), "+m" (GLptr) : "i" (~1L) : "edx"); \
     } while(0)
 
 #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
     do { \
-        asm("1:     movl (%1),%%eax;" \
+        asm("1:     movl %1,%%eax;" \
             "movl   %%eax,%%edx;" \
             "andl   %2,%%edx;" \
-            "lock;  cmpxchgl %%edx,(%1);" \
+            "lock;  cmpxchgl %%edx,%1;" \
             "jnz    1b;" \
             "andl   $0x1,%%eax" \
-            : "=a" (Acq), "+c" (GLptr) : "i" (~3L) : "edx"); \
+            : "=a" (Acq), "+m" (GLptr) : "i" (~3L) : "edx"); \
     } while(0)
 
 


More information about the p4-projects mailing list