diff options
author | jhb <jhb@FreeBSD.org> | 2003-08-04 20:34:25 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-08-04 20:34:25 +0000 |
commit | b47c7929f52663362491b3bd61378fdaaa6ff5b8 (patch) | |
tree | 9c8e8a5bd6d6d9be361c5a0df07491390d14b411 /sys/i386 | |
parent | e4889cd4700681f73e3e73980497783d0c28415a (diff) | |
download | FreeBSD-src-b47c7929f52663362491b3bd61378fdaaa6ff5b8.zip FreeBSD-src-b47c7929f52663362491b3bd61378fdaaa6ff5b8.tar.gz |
- GC unused cpu_thread_link().
- Move the enabling of interrupts out of assembly and into C a few
instructions later at cpu_critical_fork_exit(). This puts more of the
MD critical section implementation under the MD critical section API
making it easier to test and develop alternative implementations.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/critical.c | 14 | ||||
-rw-r--r-- | sys/i386/i386/exception.s | 3 | ||||
-rw-r--r-- | sys/i386/include/critical.h | 2 |
3 files changed, 1 insertions, 18 deletions
diff --git a/sys/i386/i386/critical.c b/sys/i386/i386/critical.c index a638ad9..f6c7849 100644 --- a/sys/i386/i386/critical.c +++ b/sys/i386/i386/critical.c @@ -58,24 +58,12 @@ cpu_unpend(void) /* * cpu_critical_fork_exit() - cleanup after fork - * - * For i386 we do not have to do anything, td_critnest is - * handled by the fork trampoline code. */ void cpu_critical_fork_exit(void) { -} -/* - * cpu_thread_link() - thread linkup, initialize machine-dependant fields - * - * There are currently no machine-dependant fields that require - * initialization. - */ -void -cpu_thread_link(struct thread *td) -{ + enable_intr(); } /* diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index ce07659..6343a52 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -217,9 +217,6 @@ ENTRY(fork_trampoline) pushl %esp /* trapframe pointer */ pushl %ebx /* arg1 */ pushl %esi /* function */ - movl PCPU(CURTHREAD),%ebx /* setup critnest */ - movl $1,TD_CRITNEST(%ebx) - sti /* enable interrupts */ call fork_exit addl $12,%esp /* cut from syscall */ diff --git a/sys/i386/include/critical.h b/sys/i386/include/critical.h index 7cc7ff2..53b4f3b 100644 --- a/sys/i386/include/critical.h +++ b/sys/i386/include/critical.h @@ -8,7 +8,6 @@ * cpu_critical_enter() - inlined * cpu_critical_exit() - inlined * cpu_critical_fork_exit() - prototyped - * cpu_thread_link() - prototyped * related support functions residing * in <arch>/<arch>/critical.c - prototyped * @@ -25,7 +24,6 @@ __BEGIN_DECLS */ void cpu_unpend(void); void cpu_critical_fork_exit(void); -void cpu_thread_link(struct thread *td); #ifdef __GNUC__ |