diff options
author | cognet <cognet@FreeBSD.org> | 2005-05-11 21:20:42 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2005-05-11 21:20:42 +0000 |
commit | b2be2c6b08ec2d5c2b4b24ddd94f0f026c865ff9 (patch) | |
tree | 1958b762314e7bd00b8173e687aaf49d5dc8c975 /sys/arm | |
parent | 7bc989441bb54bfafb2dd8c4d95801bd6a322ccc (diff) | |
download | FreeBSD-src-b2be2c6b08ec2d5c2b4b24ddd94f0f026c865ff9.zip FreeBSD-src-b2be2c6b08ec2d5c2b4b24ddd94f0f026c865ff9.tar.gz |
Don't forget to copy the TP when forking, or bad things will happen to the
child process if it tries to use threads.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/vm_machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 9c43362..a4c6937 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -134,6 +134,7 @@ cpu_fork(register struct thread *td1, register struct proc *p2, /* Setup to release sched_lock in fork_exit(). */ td2->td_md.md_spinlock_count = 1; td2->td_md.md_saved_cspr = 0; + td2->td_md.md_tp = *(uint32_t **)ARM_TP_ADDRESS; } void |