summaryrefslogtreecommitdiffstats
path: root/sys/arm/include
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-07-27 16:41:01 +0000
committerrwatson <rwatson@FreeBSD.org>2004-07-27 16:41:01 +0000
commit4ab080249a9f183254e39905e915442e3e7490d1 (patch)
treede9f7b08c7ab02bd97e32e53b40a626c8216f214 /sys/arm/include
parent8feaacec0cd088d29781dc3559e0d2adef8602a3 (diff)
downloadFreeBSD-src-4ab080249a9f183254e39905e915442e3e7490d1.zip
FreeBSD-src-4ab080249a9f183254e39905e915442e3e7490d1.tar.gz
Pass a thread argument into cpu_critical_{enter,exit}() rather than
dereference curthread. It is called only from critical_{enter,exit}(), which already dereferences curthread. This doesn't seem to affect SMP performance in my benchmarks, but improves MySQL transaction throughput by about 1% on UP on my Xeon. Head nodding: jhb, bmilekic
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/critical.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm/include/critical.h b/sys/arm/include/critical.h
index 6d3d46d..0f05c9f 100644
--- a/sys/arm/include/critical.h
+++ b/sys/arm/include/critical.h
@@ -40,15 +40,15 @@
#define MACHINE_CRITICAL_H
void cpu_critical_fork_exit(void);
static __inline void
-cpu_critical_enter(void)
+cpu_critical_enter(struct thread *td)
{
- curthread->td_md.md_savecrit = disable_interrupts(I32_bit | F32_bit);
+ cd->td_md.md_savecrit = disable_interrupts(I32_bit | F32_bit);
}
static __inline void
-cpu_critical_exit(void)
+cpu_critical_exit(struct thread *td)
{
- restore_interrupts(curthread->td_md.md_savecrit);
+ restore_interrupts(td->td_md.md_savecrit);
}
#endif
OpenPOWER on IntegriCloud