Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/ndis/Attic/nbcompat.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/ndis/Attic/nbcompat.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.8 retrieving revision 1.9 diff -u -p -r1.8 -r1.9 --- src/sys/compat/ndis/Attic/nbcompat.c 2007/12/11 13:22:50 1.8 +++ src/sys/compat/ndis/Attic/nbcompat.c 2008/01/07 19:10:58 1.9 @@ -1,4 +1,4 @@ -/* $NetBSD: nbcompat.c,v 1.8 2007/12/11 13:22:50 lukem Exp $ */ +/* $NetBSD: nbcompat.c,v 1.9 2008/01/07 19:10:58 rittera Exp $ */ /* nbcompat.c * Implementations of some FreeBSD functions on NetBSD to make things @@ -6,7 +6,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nbcompat.c,v 1.8 2007/12/11 13:22:50 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nbcompat.c,v 1.9 2008/01/07 19:10:58 rittera Exp $"); #include #include @@ -85,34 +85,18 @@ device_is_attached(device_t dev) */ int ndis_kthread_create(void (*func)(void *), void *arg, - struct proc **newpp, void *stack, size_t stacksize, const char *fmt, ...) + struct proc **newpp, void *stack, size_t stacksize, const char *name) { - struct proc *p2; - int error; - va_list ap; - - /* First, create the new process. */ - error = fork1(&lwp0, FORK_SHAREVM | FORK_SHARECWD | FORK_SHAREFILES | - FORK_SHARESIGS, SIGCHLD, stack, stacksize, func, arg, NULL, &p2); - if (__predict_false(error != 0)) - return (error); - - /* - * Mark it as a system process and not a candidate for - * swapping. Set P_NOCLDWAIT so that children are reparented - * to init(8) when they exit. init(8) can easily wait them - * out for us. - */ - p2->p_flag |= PK_SYSTEM | PK_NOCLDWAIT; - LIST_FIRST(&p2->p_lwps)->l_flag |= LW_INMEM; - - /* Name it as specified. */ - va_start(ap, fmt); - vsnprintf(p2->p_comm, MAXCOMLEN, fmt, ap); - va_end(ap); - - /* All done! */ - if (newpp != NULL) - *newpp = p2; - return (0); + struct proc *p2; + struct lwp *l; + int error; + + error = kthread_create(PRI_NONE, 0, NULL, func, arg, &l, "%s", name); + if (__predict_false(error != 0)) + return (error); + + /* All done! */ + if (newpp != NULL) + *newpp = l->l_proc; + return (0); }