From owner-freebsd-current@FreeBSD.ORG Sat Oct 27 16:55:07 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A897416A417 for ; Sat, 27 Oct 2007 16:55:07 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outO.internet-mail-service.net (outO.internet-mail-service.net [216.240.47.238]) by mx1.freebsd.org (Postfix) with ESMTP id 5D36813C481 for ; Sat, 27 Oct 2007 16:55:07 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sat, 27 Oct 2007 09:55:07 -0700 X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 86BA0126822 for ; Sat, 27 Oct 2007 09:55:06 -0700 (PDT) Message-ID: <47236D88.5070109@elischer.org> Date: Sat, 27 Oct 2007 09:55:36 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: kthreads etc. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2007 16:55:07 -0000 The current kthreads changes have been completed and seem to be working ok.. I will over time change over a number of the current kproc users to be kthread users, but there is no reason that this need be limited to me.. anyone working in code that uses kprocs can simply switch to using kthreads by: 1/ checking that that module doesn't NEED a process context (e.g. like AIO does) 2/ replace kproc_create(func, arg, proc**, flags, pages, fmt, fmtargs) with kthread_add(func, arg, thread**, proc* flags, pages, fmt, fmtargs) 2a/ change the pointer that used to be the proc * to be a thread *. The extra proc* arg is a pointer to the process to which the thread should be added. In general you will probably just want to make it NULL which will result in it nbeing added to proc0 which is now named "kernel" 3/ replace any other occurances of kproc with kthread.