svn commit: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps: avr32 bfin frv i386 sh x86_64
carmelo at uclibc.org
carmelo at uclibc.org
Fri Apr 25 17:27:35 UTC 2008
Author: carmelo
Date: 2008-04-25 10:27:35 -0700 (Fri, 25 Apr 2008)
New Revision: 21867
Log:
STEP 11: synch linuxthreads.old directory
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
Modified:
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/tls.h
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/sh/tls.h
branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h
Changeset:
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -18,16 +18,16 @@
static inline int
_test_and_set (int *p, int v)
{
- int result;
+ int result;
- __asm__ __volatile__(
- "/* Inline test and set */\n"
- " xchg %[old], %[mem], %[new]"
- : [old] "=&r"(result)
- : [mem] "r"(p), [new] "r"(v)
- : "memory");
+ __asm__ __volatile__(
+ "/* Inline test and set */\n"
+ " xchg %[old], %[mem], %[new]"
+ : [old] "=&r"(result)
+ : [mem] "r"(p), [new] "r"(v)
+ : "memory");
- return result;
+ return result;
}
extern long int testandset (int *spinlock);
@@ -37,7 +37,7 @@
PT_EI long int
testandset (int *spinlock)
{
- return _test_and_set(spinlock, 1);
+ return _test_and_set(spinlock, 1);
}
@@ -52,22 +52,22 @@
PT_EI int
__compare_and_swap(long int *p, long int oldval, long int newval)
{
- long int result;
+ long int result;
- __asm__ __volatile__(
- "/* Inline compare and swap */\n"
- "1: ssrf 5\n"
- " ld.w %[result], %[mem]\n"
- " eor %[result], %[old]\n"
- " brne 2f\n"
- " stcond %[mem], %[new]\n"
- " brne 1b\n"
- "2:"
- : [result] "=&r"(result), [mem] "=m"(*p)
- : "m"(*p), [new] "r"(newval), [old] "r"(oldval)
- : "cc", "memory");
+ __asm__ __volatile__(
+ "/* Inline compare and swap */\n"
+ "1: ssrf 5\n"
+ " ld.w %[result], %[mem]\n"
+ " eor %[result], %[old]\n"
+ " brne 2f\n"
+ " stcond %[mem], %[new]\n"
+ " brne 1b\n"
+ "2:"
+ : [result] "=&r"(result), [mem] "=m"(*p)
+ : "m"(*p), [new] "r"(newval), [old] "r"(oldval)
+ : "cc", "memory");
- return result == 0;
+ return result == 0;
}
#endif /* pt-machine.h */
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -70,7 +70,7 @@
#ifdef SHARED
# define PTHREAD_STATIC_FN_REQUIRE(name)
#else
-# define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " "_"#name);
+# define PTHREAD_STATIC_FN_REQUIRE(name) __asm__ (".globl " "_"#name);
#endif
#endif /* pt-machine.h */
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -35,7 +35,7 @@
testandset (int *spinlock)
{
int i = 1;
- asm ("swap%I0 %M0, %1" : "+m"(*(volatile int *)spinlock), "+r"(i));
+ __asm__ ("swap%I0 %M0, %1" : "+m"(*(volatile int *)spinlock), "+r"(i));
return i;
}
@@ -53,7 +53,7 @@
#define WRITE_MEMORY_BARRIER() __asm__ __volatile__("membar" : : : "memory")
/* Return the thread descriptor for the current thread. */
-register struct _pthread_descr_struct *THREAD_SELF asm ("gr29");
+register struct _pthread_descr_struct *THREAD_SELF __asm__ ("gr29");
#define THREAD_SELF THREAD_SELF
/* Initialize the thread-unique value. */
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/tls.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/tls.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/tls.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -104,7 +104,7 @@
{ nr, (unsigned long int) (descr), 0xfffff /* 4GB in pages */, \
1, 0, 0, 1, 0, 1, 0 }; \
int result; \
- asm volatile (TLS_LOAD_EBX \
+ __asm__ __volatile__ (TLS_LOAD_EBX \
"int $0x80\n\t" \
TLS_LOAD_EBX \
: "=a" (result) \
@@ -125,9 +125,9 @@
int result; \
if (secondcall) \
ldt_entry.entry_number = ({ int _gs; \
- asm ("movw %%gs, %w0" : "=q" (_gs)); \
+ __asm__ ("movw %%gs, %w0" : "=q" (_gs)); \
(_gs & 0xffff) >> 3; }); \
- asm volatile (TLS_LOAD_EBX \
+ __asm__ __volatile__ (TLS_LOAD_EBX \
"int $0x80\n\t" \
TLS_LOAD_EBX \
: "=a" (result), "=m" (ldt_entry.entry_number) \
@@ -167,7 +167,7 @@
__gs = TLS_SETUP_GS_SEGMENT (_descr, secondcall); \
if (__builtin_expect (__gs, 7) != -1) \
{ \
- asm ("movw %w0, %%gs" : : "q" (__gs)); \
+ __asm__ ("movw %w0, %%gs" : : "q" (__gs)); \
__gs = 0; \
} \
__gs; \
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/useldt.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/i386/useldt.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -71,7 +71,7 @@
1, 0, 0, 1, 0, 1, 0 }; \
if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0) \
abort (); \
- asm ("movw %w0, %%gs" : : "q" (nr * 8 + 7)); \
+ __asm__ ("movw %w0, %%gs" : : "q" (nr * 8 + 7)); \
})
#ifdef __PIC__
@@ -97,21 +97,21 @@
int __gs; \
if (DO_SET_THREAD_AREA_REUSE (nr)) \
{ \
- asm ("movw %%gs, %w0" : "=q" (__gs)); \
+ __asm__ ("movw %%gs, %w0" : "=q" (__gs)); \
struct modify_ldt_ldt_s ldt_entry = \
{ (__gs & 0xffff) >> 3, \
(unsigned long int) (descr), 0xfffff /* 4GB in pages */, \
1, 0, 0, 1, 0, 1, 0 }; \
\
int __result; \
- __asm (USETLS_LOAD_EBX \
+ __asm__ (USETLS_LOAD_EBX \
"movl %2, %%eax\n\t" \
"int $0x80\n\t" \
USETLS_LOAD_EBX \
: "&a" (__result) \
: USETLS_EBX_ARG (&ldt_entry), "i" (__NR_set_thread_area)); \
if (__result == 0) \
- asm ("movw %w0, %%gs" :: "q" (__gs)); \
+ __asm__ ("movw %w0, %%gs" :: "q" (__gs)); \
else \
__gs = -1; \
} \
@@ -122,7 +122,7 @@
(unsigned long int) (descr), 0xfffff /* 4GB in pages */, \
1, 0, 0, 1, 0, 1, 0 }; \
int __result; \
- __asm (USETLS_LOAD_EBX \
+ __asm__ (USETLS_LOAD_EBX \
"movl %2, %%eax\n\t" \
"int $0x80\n\t" \
USETLS_LOAD_EBX \
@@ -131,7 +131,7 @@
if (__result == 0) \
{ \
__gs = (ldt_entry.entry_number << 3) + 3; \
- asm ("movw %w0, %%gs" : : "q" (__gs)); \
+ __asm__ ("movw %w0, %%gs" : : "q" (__gs)); \
} \
else \
__gs = -1; \
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/sh/tls.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/sh/tls.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/sh/tls.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -100,7 +100,7 @@
/* For now the thread descriptor is at the same address. */ \
head->self = _descr; \
\
- asm ("ldc %0,gbr" : : "r" (_descr)); \
+ __asm__ ("ldc %0,gbr" : : "r" (_descr)); \
\
0; \
})
Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h 2008-04-25 17:26:54 UTC (rev 21866)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h 2008-04-25 17:27:35 UTC (rev 21867)
@@ -108,7 +108,7 @@
/* For now the thread descriptor is at the same address. */ \
head->self = _descr; \
\
- asm volatile ("syscall" \
+ __asm__ __volatile__ ("syscall" \
: "=a" (_result) \
: "0" ((unsigned long int) __NR_arch_prctl), \
"D" ((unsigned long int) ARCH_SET_FS), \
More information about the uClibc-cvs
mailing list