Bugzilla bug 151709: declare the temporary variables as PRInt32.
authorwchang0222%aol.com
Mon, 06 Dec 2004 23:40:23 +0000
changeset 3232 587b5c633de3391767a0b63492b2294b272360b8
parent 3229 19bb9356d67637f169594cc6960e4e0d586ced94
child 3237 7f9eaa5abb14b3070eb705e9b0f00394c7b0e6f0
push idunknown
push userunknown
push dateunknown
bugs151709
Bugzilla bug 151709: declare the temporary variables as PRInt32.
pr/include/md/_linux.h
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -126,17 +126,17 @@ extern PRInt32 _PR_x86_64_AtomicAdd(PRIn
 extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
 #define _MD_ATOMIC_SET                _PR_x86_64_AtomicSet
 #endif
 
 #if defined(__alpha)
 #define _PR_HAVE_ATOMIC_OPS
 #define _MD_INIT_ATOMIC()
 #define _MD_ATOMIC_ADD(ptr, i) ({               \
-    unsigned long __atomic_tmp, __atomic_ret;   \
+    PRInt32 __atomic_tmp, __atomic_ret;   \
     __asm__ __volatile__(                       \
     "1: ldl_l   %[ret], %[val]          \n"     \
     "   addl    %[ret], %[inc], %[tmp]  \n"     \
     "   addl    %[ret], %[inc], %[ret]  \n"     \
     "   stl_c   %[tmp], %[val]          \n"     \
     "   beq     %[tmp], 2f              \n"     \
     ".subsection 2                      \n"     \
     "2: br      1b                      \n"     \
@@ -144,34 +144,34 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn
     : [ret] "=&r" (__atomic_ret),               \
       [tmp] "=&r" (__atomic_tmp),               \
       [val] "=m" (*ptr)                         \
     : [inc] "Ir" (i), "m" (*ptr));              \
     __atomic_ret;                               \
 })
 #define _MD_ATOMIC_INCREMENT(ptr) _MD_ATOMIC_ADD(ptr, 1)
 #define _MD_ATOMIC_DECREMENT(ptr) ({            \
-    unsigned long __atomic_tmp, __atomic_ret;   \
+    PRInt32 __atomic_tmp, __atomic_ret;   \
     __asm__ __volatile__(                       \
     "1: ldl_l   %[ret], %[val]          \n"     \
     "   subl    %[ret], 1, %[tmp]       \n"     \
     "   subl    %[ret], 1, %[ret]       \n"     \
     "   stl_c   %[tmp], %[val]          \n"     \
     "   beq     %[tmp], 2f              \n"     \
     ".subsection 2                      \n"     \
     "2: br      1b                      \n"     \
     ".previous"                                 \
     : [ret] "=&r" (__atomic_ret),               \
       [tmp] "=&r" (__atomic_tmp),               \
       [val] "=m" (*ptr)                         \
     : "m" (*ptr));                              \
     __atomic_ret;                               \
 })
 #define _MD_ATOMIC_SET(ptr, n) ({               \
-    unsigned long __atomic_tmp, __atomic_ret;   \
+    PRInt32 __atomic_tmp, __atomic_ret;   \
     __asm__ __volatile__(                       \
     "1: ldl_l   %[ret], %[val]          \n"     \
     "   mov     %[newval], %[tmp]       \n"     \
     "   stl_c   %[tmp], %[val]          \n"     \
     "   beq     %[tmp], 2f              \n"     \
     ".subsection 2                      \n"     \
     "2: br      1b                      \n"     \
     ".previous"                                 \