PERFORCE change 50825 for review
Julian Elischer
julian at FreeBSD.org
Sun Apr 11 02:11:10 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=50825
Change 50825 by julian at julian_jules1 on 2004/04/11 02:10:23
tweek tweek
Affected files ...
.. //depot/projects/nsched/sys/kern/kern_thread.c#7 edit
Differences ...
==== //depot/projects/nsched/sys/kern/kern_thread.c#7 (text+ko) ====
@@ -1262,6 +1262,7 @@
td->td_standin = NULL;
}
+ /* drop FPU & debug register state */
cpu_thread_exit(td); /* XXXSMP */
/*
* The last thread is left attached to the process
@@ -1440,6 +1441,8 @@
if (spare == NULL) {
spare = thread_alloc();
spare->td_tid = thread_new_tid();
+ } else {
+ sched_init_thread(spare);
}
td->td_standin = spare;
bzero(&spare->td_startzero,
@@ -1476,8 +1479,7 @@
bcopy(&td->td_startcopy, &td2->td_startcopy,
(unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy));
thread_link(td2, ku->ku_ksegrp);
- sched_init_thread(td2);
- /* inherit blocked thread's context */
+ /* inherit parts of blocked thread's context as a good template */
cpu_set_upcall(td2, td);
/* Let the new thread become owner of the upcall */
ku->ku_owner = td2;
@@ -1488,7 +1490,6 @@
td2->td_inhibitors = 0;
SIGFILLSET(td2->td_sigmask);
SIG_CANTMASK(td2->td_sigmask);
- sched_init_thread(td2);
sched_fork_thread(td, td2);
return (td2); /* bogus.. should be a void function */
}
More information about the p4-projects
mailing list