summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-10-05 04:49:46 +0000
committerjmallett <jmallett@FreeBSD.org>2002-10-05 04:49:46 +0000
commit2061c32a164aa522c82ef2832766ea00d4be98f1 (patch)
treeed4213cb8fad52ee0117c7c0bb065f9eca50e2c9
parentdbf91abc13b728812958c0cb4d3d70c51a5b90c3 (diff)
downloadFreeBSD-src-2061c32a164aa522c82ef2832766ea00d4be98f1.zip
FreeBSD-src-2061c32a164aa522c82ef2832766ea00d4be98f1.tar.gz
Put an easy-to-miss assignment into the proper place. It was stray in the
middle of a block of code, with no clear assignment. While here, move one nearby assignment out of declaration.
-rw-r--r--sys/kern/kern_kse.c6
-rw-r--r--sys/kern/kern_thread.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index 2f6ccc5..3326119 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -340,13 +340,16 @@ thread_free(struct thread *td)
int
thread_export_context(struct thread *td)
{
- struct proc *p = td->td_proc;
+ struct proc *p;
struct ksegrp *kg;
uintptr_t mbx;
void *addr;
int error;
ucontext_t uc;
+ p = td->td_proc;
+ kg = td->td_ksegrp;
+
/* Export the user/machine context. */
#if 0
addr = (caddr_t)td->td_mailbox +
@@ -377,7 +380,6 @@ thread_export_context(struct thread *td)
* Put the saved address of the previous first
* entry into this one
*/
- kg = td->td_ksegrp;
for (;;) {
mbx = (uintptr_t)kg->kg_completed;
if (suword(addr, mbx)) {
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 2f6ccc5..3326119 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -340,13 +340,16 @@ thread_free(struct thread *td)
int
thread_export_context(struct thread *td)
{
- struct proc *p = td->td_proc;
+ struct proc *p;
struct ksegrp *kg;
uintptr_t mbx;
void *addr;
int error;
ucontext_t uc;
+ p = td->td_proc;
+ kg = td->td_ksegrp;
+
/* Export the user/machine context. */
#if 0
addr = (caddr_t)td->td_mailbox +
@@ -377,7 +380,6 @@ thread_export_context(struct thread *td)
* Put the saved address of the previous first
* entry into this one
*/
- kg = td->td_ksegrp;
for (;;) {
mbx = (uintptr_t)kg->kg_completed;
if (suword(addr, mbx)) {
OpenPOWER on IntegriCloud