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)
This commit is contained in:
peter 2003-12-06 23:13:22 +00:00
parent 26fe80f4fa
commit 9dc1f87f1b
2 changed files with 3 additions and 19 deletions
sys/amd64

@ -30,15 +30,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/pcpu.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/ucontext.h>
#include <machine/clock.h>
#include <machine/critical.h>
/*
@ -47,8 +39,6 @@ __FBSDID("$FreeBSD$");
void
cpu_critical_fork_exit(void)
{
struct thread *td;
td = curthread;
td->td_md.md_savecrit = read_rflags() | PSL_I;
curthread->td_md.md_savecrit = read_rflags() | PSL_I;
}

@ -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__ */