View | Details | Raw Unified | Return to bug 126223
Collapse All | Expand All

(-)sys/kern/kern_kthread.c (-2 lines)
Lines 241-256 Link Here
241
kthread_add(void (*func)(void *), void *arg, struct proc *p,
241
kthread_add(void (*func)(void *), void *arg, struct proc *p,
242
    struct thread **newtdp, int flags, int pages, const char *fmt, ...)
242
    struct thread **newtdp, int flags, int pages, const char *fmt, ...)
243
{
243
{
244
	va_list ap;
244
	va_list ap;
245
	struct thread *newtd, *oldtd;
245
	struct thread *newtd, *oldtd;
246
	int error;
247
246
248
	if (!proc0.p_stats)
247
	if (!proc0.p_stats)
249
		panic("kthread_add called too soon");
248
		panic("kthread_add called too soon");
250
249
251
	error = 0;
252
	/* If no process supplied, put it on proc0 */
250
	/* If no process supplied, put it on proc0 */
253
	if (p == NULL) {
251
	if (p == NULL) {
254
		p = &proc0;
252
		p = &proc0;
255
		oldtd = &thread0;
253
		oldtd = &thread0;
256
	} else {
254
	} else {

Return to bug 126223