summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps/sh
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/sh')
-rw-r--r--libpthread/linuxthreads/sysdeps/sh/pspinlock.c4
-rw-r--r--libpthread/linuxthreads/sysdeps/sh/tls.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/libpthread/linuxthreads/sysdeps/sh/pspinlock.c b/libpthread/linuxthreads/sysdeps/sh/pspinlock.c
index 2dec849d3..c4e333a74 100644
--- a/libpthread/linuxthreads/sysdeps/sh/pspinlock.c
+++ b/libpthread/linuxthreads/sysdeps/sh/pspinlock.c
@@ -27,7 +27,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
unsigned int val;
do
- asm volatile ("tas.b @%1; movt %0"
+ __asm__ __volatile__ ("tas.b @%1; movt %0"
: "=r" (val)
: "r" (lock)
: "memory");
@@ -43,7 +43,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
{
unsigned int val;
- asm volatile ("tas.b @%1; movt %0"
+ __asm__ __volatile__ ("tas.b @%1; movt %0"
: "=r" (val)
: "r" (lock)
: "memory");
diff --git a/libpthread/linuxthreads/sysdeps/sh/tls.h b/libpthread/linuxthreads/sysdeps/sh/tls.h
index 027be4bf4..350d129db 100644
--- a/libpthread/linuxthreads/sysdeps/sh/tls.h
+++ b/libpthread/linuxthreads/sysdeps/sh/tls.h
@@ -91,7 +91,7 @@ typedef struct
/* Install new dtv for current thread. */
# define INSTALL_NEW_DTV(dtv) \
({ tcbhead_t *__tcbp; \
- __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \
+ __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp)); \
__tcbp->dtv = (dtv);})
/* Return dtv of given thread descriptor. */
@@ -102,25 +102,25 @@ typedef struct
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
- ({ __asm __volatile ("ldc %0,gbr" : : "r" (tcbp)); 0; })
+ ({ __asm__ __volatile__ ("ldc %0,gbr" : : "r" (tcbp)); 0; })
/* Return the address of the dtv for the current thread. */
# define THREAD_DTV() \
({ tcbhead_t *__tcbp; \
- __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \
+ __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp)); \
__tcbp->dtv;})
/* Return the thread descriptor for the current thread. */
# undef THREAD_SELF
# define THREAD_SELF \
({ struct _pthread_descr_struct *__self; \
- __asm ("stc gbr,%0" : "=r" (__self)); \
+ __asm__ ("stc gbr,%0" : "=r" (__self)); \
__self - 1;})
# undef INIT_THREAD_SELF
# define INIT_THREAD_SELF(descr, nr) \
({ struct _pthread_descr_struct *__self = (void *) descr; \
- __asm __volatile ("ldc %0,gbr" : : "r" (__self + 1)); \
+ __asm__ __volatile__ ("ldc %0,gbr" : : "r" (__self + 1)); \
0; })
# define TLS_MULTIPLE_THREADS_IN_TCB 1
@@ -149,7 +149,7 @@ typedef struct
# define NONTLS_INIT_TP \
do { \
static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 }; \
- __asm __volatile ("ldc %0,gbr" : : "r" (&nontls_init_tp)); \
+ __asm__ __volatile__ ("ldc %0,gbr" : : "r" (&nontls_init_tp)); \
} while (0)
# endif /* __ASSEMBLER__ */