kern_thr.c (f2c49dd248bf7d1e03c7822ea6eb38e24a6b9f41) | kern_thr.c (11e0f8e16d4180acd1ef277011e9a30fc72ab6c7) |
---|---|
1/* 2 * Copyright (c) 2003, Jeffrey Roberson <jeff@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 142 unchanged lines hidden (view full) --- 151 (unsigned)RANGEOF(struct thread, td_startzero, td_endzero)); 152 bcopy(&td->td_startcopy, &td0->td_startcopy, 153 (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy)); 154 155 td0->td_proc = td->td_proc; 156 PROC_LOCK(td->td_proc); 157 td0->td_sigmask = td->td_sigmask; 158 PROC_UNLOCK(td->td_proc); | 1/* 2 * Copyright (c) 2003, Jeffrey Roberson <jeff@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 142 unchanged lines hidden (view full) --- 151 (unsigned)RANGEOF(struct thread, td_startzero, td_endzero)); 152 bcopy(&td->td_startcopy, &td0->td_startcopy, 153 (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy)); 154 155 td0->td_proc = td->td_proc; 156 PROC_LOCK(td->td_proc); 157 td0->td_sigmask = td->td_sigmask; 158 PROC_UNLOCK(td->td_proc); |
159 bcopy(td->td_frame, td0->td_frame, sizeof(struct trapframe)); | |
160 td0->td_ucred = crhold(td->td_ucred); 161 162 /* Initialize our kse structure. */ 163 ke0 = kse_alloc(); 164 bzero(&ke0->ke_startzero, 165 RANGEOF(struct kse, ke_startzero, ke_endzero)); 166 167 /* Set up our machine context. */ | 159 td0->td_ucred = crhold(td->td_ucred); 160 161 /* Initialize our kse structure. */ 162 ke0 = kse_alloc(); 163 bzero(&ke0->ke_startzero, 164 RANGEOF(struct kse, ke_startzero, ke_endzero)); 165 166 /* Set up our machine context. */ |
168 cpu_set_upcall(td0, td->td_pcb); | 167 cpu_set_upcall(td0, td); |
169 error = set_mcontext(td0, &ctx.uc_mcontext); 170 if (error != 0) { 171 kse_free(ke0); 172 thread_free(td0); 173 goto out; 174 } 175 176 /* Link the thread and kse into the ksegrp and make it runnable. */ --- 95 unchanged lines hidden --- | 168 error = set_mcontext(td0, &ctx.uc_mcontext); 169 if (error != 0) { 170 kse_free(ke0); 171 thread_free(td0); 172 goto out; 173 } 174 175 /* Link the thread and kse into the ksegrp and make it runnable. */ --- 95 unchanged lines hidden --- |