kern_kthread.c (310086415a058953ec3243a0df843a6d46c1bd11) | kern_kthread.c (37b087a645354d60200c774d51b305b268e41c83) |
---|---|
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 --- 55 unchanged lines hidden (view full) --- 64int 65kthread_create(void (*func)(void *), void *arg, 66 struct proc **newpp, const char *fmt, ...) 67{ 68 int error; 69 va_list ap; 70 struct proc *p2; 71 | 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 --- 55 unchanged lines hidden (view full) --- 64int 65kthread_create(void (*func)(void *), void *arg, 66 struct proc **newpp, const char *fmt, ...) 67{ 68 int error; 69 va_list ap; 70 struct proc *p2; 71 |
72 if (!proc0.p_stats || proc0.p_stats->p_start.tv_sec == 0) { 73 panic("kthread_create called too soon"); 74 } 75 | |
76 error = fork1(&proc0, RFMEM | RFFDG | RFPROC, &p2); 77 if (error) 78 return error; 79 80 /* save a global descriptor, if desired */ 81 if (newpp != NULL) 82 *newpp = p2; 83 --- 61 unchanged lines hidden --- | 72 error = fork1(&proc0, RFMEM | RFFDG | RFPROC, &p2); 73 if (error) 74 return error; 75 76 /* save a global descriptor, if desired */ 77 if (newpp != NULL) 78 *newpp = p2; 79 --- 61 unchanged lines hidden --- |