Deleted Added
full compact
kern_kthread.c (166188) kern_kthread.c (170307)
1/*-
2 * Copyright (c) 1999 Peter Wemm <peter@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

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999 Peter Wemm <peter@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

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/kern/kern_kthread.c 166188 2007-01-23 08:46:51Z jeff $");
28__FBSDID("$FreeBSD: head/sys/kern/kern_kthread.c 170307 2007-06-05 00:00:57Z jeff $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kthread.h>
33#include <sys/lock.h>
34#include <sys/mutex.h>
35#include <sys/proc.h>
36#include <sys/resourcevar.h>

--- 71 unchanged lines hidden (view full) ---

108
109 /* call the processes' main()... */
110 td = FIRST_THREAD_IN_PROC(p2);
111 cpu_set_fork_handler(td, func, arg);
112 TD_SET_CAN_RUN(td);
113
114 /* Delay putting it on the run queue until now. */
115 if (!(flags & RFSTOPPED)) {
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kthread.h>
33#include <sys/lock.h>
34#include <sys/mutex.h>
35#include <sys/proc.h>
36#include <sys/resourcevar.h>

--- 71 unchanged lines hidden (view full) ---

108
109 /* call the processes' main()... */
110 td = FIRST_THREAD_IN_PROC(p2);
111 cpu_set_fork_handler(td, func, arg);
112 TD_SET_CAN_RUN(td);
113
114 /* Delay putting it on the run queue until now. */
115 if (!(flags & RFSTOPPED)) {
116 mtx_lock_spin(&sched_lock);
116 thread_lock(td);
117 sched_add(td, SRQ_BORING);
117 sched_add(td, SRQ_BORING);
118 mtx_unlock_spin(&sched_lock);
118 thread_unlock(td);
119 }
120
121 return 0;
122}
123
124void
125kthread_exit(int ecode)
126{

--- 74 unchanged lines hidden ---
119 }
120
121 return 0;
122}
123
124void
125kthread_exit(int ecode)
126{

--- 74 unchanged lines hidden ---