diff options
Diffstat (limited to 'sys/amd64/include/critical.h')
-rw-r--r-- | sys/amd64/include/critical.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/amd64/include/critical.h b/sys/amd64/include/critical.h index 3b2d4727..0e02e1f 100644 --- a/sys/amd64/include/critical.h +++ b/sys/amd64/include/critical.h @@ -55,9 +55,10 @@ void cpu_critical_fork_exit(void); * of td_critnest, prior to it being incremented to 1. */ static __inline void -cpu_critical_enter(void) +cpu_critical_enter(struct thread *td) { - curthread->td_md.md_savecrit = intr_disable(); + + td->td_md.md_savecrit = intr_disable(); } /* @@ -68,15 +69,15 @@ cpu_critical_enter(void) * exiting the last critical section. */ static __inline void -cpu_critical_exit(void) +cpu_critical_exit(struct thread *td) { - intr_restore(curthread->td_md.md_savecrit); + intr_restore(td->td_md.md_savecrit); } #else /* !__GNUC__ */ -void cpu_critical_enter(void); -void cpu_critical_exit(void); +void cpu_critical_enter(struct thread *td); +void cpu_critical_exit(struct thread *td); #endif /* __GNUC__ */ |