diff options
author | peter <peter@FreeBSD.org> | 2003-12-06 23:13:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-12-06 23:13:22 +0000 |
commit | 9dc1f87f1b08cc09cfce748d23a6a0ecf8b656d7 (patch) | |
tree | 8533e299caf431f8f6400a447a5fafb5ba212296 /sys/amd64/include/critical.h | |
parent | 26fe80f4fae64daa04f894e6cb7be6455b6d8706 (diff) | |
download | FreeBSD-src-9dc1f87f1b08cc09cfce748d23a6a0ecf8b656d7.zip FreeBSD-src-9dc1f87f1b08cc09cfce748d23a6a0ecf8b656d7.tar.gz |
Revert some amd64 changes that cached curthread and converge back to the
i386 version. The curthread special case in pcpu.h solves my complaint
about the verbose macro expansion in this case. Note that the i386
version still has some OBE comments, I didn't re-add them back again.
Approved by: re (scottl)
Diffstat (limited to 'sys/amd64/include/critical.h')
-rw-r--r-- | sys/amd64/include/critical.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/amd64/include/critical.h b/sys/amd64/include/critical.h index e50e1bd..4db926a 100644 --- a/sys/amd64/include/critical.h +++ b/sys/amd64/include/critical.h @@ -57,10 +57,7 @@ void cpu_critical_fork_exit(void); static __inline void cpu_critical_enter(void) { - struct thread *td; - - td = curthread; - td->td_md.md_savecrit = intr_disable(); + curthread->td_md.md_savecrit = intr_disable(); } /* @@ -73,10 +70,7 @@ cpu_critical_enter(void) static __inline void cpu_critical_exit(void) { - struct thread *td; - - td = curthread; - intr_restore(td->td_md.md_savecrit); + intr_restore(curthread->td_md.md_savecrit); } #else /* !__GNUC__ */ |