kern_thread.c (b75b03116f6137e570f5f158ac66831ecf90954e) | kern_thread.c (21fc3164307dc288ff6eb1f028a268f3c76cc6e5) |
---|---|
1/*- 2 * Copyright (C) 2001 Julian Elischer <julian@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 --- 244 unchanged lines hidden (view full) --- 253 KASSERT((kg->kg_numupcalls == 0), ("ksegrp_unlink: residual upcalls")); 254 255 p = kg->kg_proc; 256 TAILQ_REMOVE(&p->p_ksegrps, kg, kg_ksegrp); 257 p->p_numksegrps--; 258 /* 259 * Aggregate stats from the KSE 260 */ | 1/*- 2 * Copyright (C) 2001 Julian Elischer <julian@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 --- 244 unchanged lines hidden (view full) --- 253 KASSERT((kg->kg_numupcalls == 0), ("ksegrp_unlink: residual upcalls")); 254 255 p = kg->kg_proc; 256 TAILQ_REMOVE(&p->p_ksegrps, kg, kg_ksegrp); 257 p->p_numksegrps--; 258 /* 259 * Aggregate stats from the KSE 260 */ |
261 if (p->p_procscopegrp == kg) 262 p->p_procscopegrp = NULL; |
|
261} 262 263/* 264 * For a newly created process, 265 * link up all the structures and its initial threads etc. 266 * called from: 267 * {arch}/{arch}/machdep.c ia64_init(), init386() etc. 268 * proc_dtor() (should go away) --- 716 unchanged lines hidden (view full) --- 985 struct proc *p; 986 987 td = curthread; 988 p = td->td_proc; 989 PROC_LOCK_ASSERT(p, MA_OWNED); 990 p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_SINGLE_BOUNDARY); 991 mtx_lock_spin(&sched_lock); 992 p->p_singlethread = NULL; | 263} 264 265/* 266 * For a newly created process, 267 * link up all the structures and its initial threads etc. 268 * called from: 269 * {arch}/{arch}/machdep.c ia64_init(), init386() etc. 270 * proc_dtor() (should go away) --- 716 unchanged lines hidden (view full) --- 987 struct proc *p; 988 989 td = curthread; 990 p = td->td_proc; 991 PROC_LOCK_ASSERT(p, MA_OWNED); 992 p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_SINGLE_BOUNDARY); 993 mtx_lock_spin(&sched_lock); 994 p->p_singlethread = NULL; |
995 p->p_procscopegrp = NULL; |
|
993 /* 994 * If there are other threads they mey now run, 995 * unless of course there is a blanket 'stop order' 996 * on the process. The single threader must be allowed 997 * to continue however as this is a bad place to stop. 998 */ 999 if ((p->p_numthreads != 1) && (!P_SHOULDSTOP(p))) { 1000 while ((td = TAILQ_FIRST(&p->p_suspended))) { --- 29 unchanged lines hidden --- | 996 /* 997 * If there are other threads they mey now run, 998 * unless of course there is a blanket 'stop order' 999 * on the process. The single threader must be allowed 1000 * to continue however as this is a bad place to stop. 1001 */ 1002 if ((p->p_numthreads != 1) && (!P_SHOULDSTOP(p))) { 1003 while ((td = TAILQ_FIRST(&p->p_suspended))) { --- 29 unchanged lines hidden --- |