summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/include/pcpu.h4
-rw-r--r--sys/i386/include/pcpu.h4
-rw-r--r--sys/ia64/include/pcpu.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index a55627f..c4b0c44 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -216,12 +216,12 @@ extern struct pcpu *pcpup;
#define PCPU_PTR(member) __PCPU_PTR(pc_ ## member)
#define PCPU_SET(member, val) __PCPU_SET(pc_ ## member, val)
-static __inline struct thread *
+static __inline __pure2 struct thread *
__curthread(void)
{
struct thread *td;
- __asm __volatile("movq %%gs:0,%0" : "=r" (td));
+ __asm("movq %%gs:0,%0" : "=r" (td));
return (td);
}
#define curthread (__curthread())
diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h
index d80f8e1..8906eda 100644
--- a/sys/i386/include/pcpu.h
+++ b/sys/i386/include/pcpu.h
@@ -223,12 +223,12 @@ extern struct pcpu *pcpup;
#define PCPU_PTR(member) __PCPU_PTR(pc_ ## member)
#define PCPU_SET(member, val) __PCPU_SET(pc_ ## member, val)
-static __inline struct thread *
+static __inline __pure2 struct thread *
__curthread(void)
{
struct thread *td;
- __asm __volatile("movl %%fs:0,%0" : "=r" (td));
+ __asm("movl %%fs:0,%0" : "=r" (td));
return (td);
}
#define curthread (__curthread())
diff --git a/sys/ia64/include/pcpu.h b/sys/ia64/include/pcpu.h
index 3c6e6a7..58403aa 100644
--- a/sys/ia64/include/pcpu.h
+++ b/sys/ia64/include/pcpu.h
@@ -70,12 +70,12 @@ struct pcpu;
register struct pcpu *pcpup __asm__("r13");
-static __inline struct thread *
+static __inline __pure2 struct thread *
__curthread(void)
{
struct thread *td;
- __asm __volatile("ld8.acq %0=[r13]" : "=r"(td));
+ __asm("ld8.acq %0=[r13]" : "=r"(td));
return (td);
}
#define curthread (__curthread())
OpenPOWER on IntegriCloud