]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/uclibc/lib/contrib/uclibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libpthread / nptl / sysdeps / unix / sysv / linux / x86_64 / lowlevellock.h
index ffab81eb5524332aee1961103fc34a674cca84a9..c0e8c030371552439f83ea59a93804c19baf700b 100644 (file)
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LOWLEVELLOCK_H
 #define _LOWLEVELLOCK_H        1
@@ -332,7 +331,7 @@ LLL_STUB_UNWIND_INFO_END
     })                                                                       \
 
 #define lll_robust_lock(futex, id, private) \
-  ({ int result, ignore1, ignore2;                                           \
+  ({ int __ret, ignore1, ignore2;                                            \
     __asm__ __volatile__ (LOCK_INSTR "cmpxchgl %4, %2\n\t"                           \
                      "jnz 1f\n\t"                                            \
                      ".subsection 1\n\t"                                     \
@@ -348,10 +347,10 @@ LLL_STUB_UNWIND_INFO_END
                      LLL_STUB_UNWIND_INFO_5                                  \
                      "24:"                                                   \
                      : "=S" (ignore1), "=D" (ignore2), "=m" (futex),         \
-                       "=a" (result)                                         \
+                       "=a" (__ret)                                          \
                      : "1" (id), "m" (futex), "3" (0), "0" (private)         \
                      : "cx", "r11", "cc", "memory");                         \
-    result; })
+    __ret; })
 
 #define lll_cond_lock(futex, private) \
   (void)                                                                     \
@@ -377,7 +376,7 @@ LLL_STUB_UNWIND_INFO_END
     })
 
 #define lll_robust_cond_lock(futex, id, private) \
-  ({ int result, ignore1, ignore2;                                           \
+  ({ int __ret, ignore1, ignore2;                                            \
     __asm__ __volatile__ (LOCK_INSTR "cmpxchgl %4, %2\n\t"                           \
                      "jnz 1f\n\t"                                            \
                      ".subsection 1\n\t"                                     \
@@ -393,14 +392,14 @@ LLL_STUB_UNWIND_INFO_END
                      LLL_STUB_UNWIND_INFO_5                                  \
                      "24:"                                                   \
                      : "=S" (ignore1), "=D" (ignore2), "=m" (futex),         \
-                       "=a" (result)                                         \
+                       "=a" (__ret)                                          \
                      : "1" (id | FUTEX_WAITERS), "m" (futex), "3" (0),       \
                        "0" (private)                                         \
                      : "cx", "r11", "cc", "memory");                         \
-    result; })
+    __ret; })
 
 #define lll_timedlock(futex, timeout, private) \
-  ({ int result, ignore1, ignore2, ignore3;                                  \
+  ({ int __ret, ignore1, ignore2, ignore3;                                   \
      __asm__ __volatile__ (LOCK_INSTR "cmpxchgl %1, %4\n\t"                          \
                       "jnz 1f\n\t"                                           \
                       ".subsection 1\n\t"                                    \
@@ -416,15 +415,15 @@ LLL_STUB_UNWIND_INFO_END
                       ".previous\n"                                          \
                       LLL_STUB_UNWIND_INFO_6                                 \
                       "24:"                                                  \
-                      : "=a" (result), "=D" (ignore1), "=S" (ignore2),       \
+                      : "=a" (__ret), "=D" (ignore1), "=S" (ignore2),        \
                         "=&d" (ignore3), "=m" (futex)                        \
                       : "0" (0), "1" (1), "m" (futex), "m" (timeout),        \
                         "2" (private)                                        \
                       : "memory", "cx", "cc", "r10", "r11");                 \
-     result; })
+     __ret; })
 
 #define lll_robust_timedlock(futex, timeout, id, private) \
-  ({ int result, ignore1, ignore2, ignore3;                                  \
+  ({ int __ret, ignore1, ignore2, ignore3;                                   \
      __asm__ __volatile__ (LOCK_INSTR "cmpxchgl %1, %4\n\t"                          \
                       "jnz 1f\n\t"                                           \
                       ".subsection 1\n\t"                                    \
@@ -440,12 +439,12 @@ LLL_STUB_UNWIND_INFO_END
                       ".previous\n"                                          \
                       LLL_STUB_UNWIND_INFO_6                                 \
                       "24:"                                                  \
-                      : "=a" (result), "=D" (ignore1), "=S" (ignore2),       \
+                      : "=a" (__ret), "=D" (ignore1), "=S" (ignore2),       \
                         "=&d" (ignore3), "=m" (futex)                        \
                       : "0" (0), "1" (id), "m" (futex), "m" (timeout),       \
                         "2" (private)                                        \
                       : "memory", "cx", "cc", "r10", "r11");                 \
-     result; })
+     __ret; })
 
 #if defined NOT_IN_libc || defined UP
 # define __lll_unlock_asm_start LOCK_INSTR "decl %0\n\t"                     \
@@ -583,15 +582,15 @@ extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
      attribute_hidden;
 #define lll_timedwait_tid(tid, abstime) \
   ({                                                                         \
-    int __result = 0;                                                        \
+    int __ret = 0;                                                           \
     if (tid != 0)                                                            \
       {                                                                              \
        if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)           \
-         __result = EINVAL;                                                  \
+         __ret = EINVAL;                                                     \
        else                                                                  \
-         __result = __lll_timedwait_tid (&tid, abstime);                     \
+         __ret = __lll_timedwait_tid (&tid, abstime);                \
       }                                                                              \
-    __result; })
+    __ret; })
 
 #endif  /* !__ASSEMBLER__ */