From owner-freebsd-current@FreeBSD.ORG Sat Oct 27 17:59:41 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 D997616A418 for ; Sat, 27 Oct 2007 17:59:41 +0000 (UTC) (envelope-from wearabnet@yahoo.ca) Received: from web33706.mail.mud.yahoo.com (web33706.mail.mud.yahoo.com [68.142.201.203]) by mx1.freebsd.org (Postfix) with SMTP id 9C7C213C480 for ; Sat, 27 Oct 2007 17:59:41 +0000 (UTC) (envelope-from wearabnet@yahoo.ca) Received: (qmail 39082 invoked by uid 60001); 27 Oct 2007 17:33:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=ISyopvv1f2PVedAFH4T+v61f5xhTfBnfGfXhuKTPIYAMmg8lLe8UZhkUgCuFErdG/DdLXyn95tvnyLlsvjuL00N9MRWDl0WJz5R8udX1rYdZJgy2IMsx7LbL4u4czLGOKtzQWnGJmrdc40LoRAl4wSuuHX73q6pS9jS1OwLS0Ho=; X-YMail-OSG: lOmCKkYVM1nie0aQQ4MO4lsC5.ZxSJDSNSDIFeIQfdklsYcdt9MGCiGOR9AbcLhACpY96vaVc80g9DnPOXkYPg0UXQoEen7gU.SxjelhQvWloH4yYsA- Received: from [89.211.5.3] by web33706.mail.mud.yahoo.com via HTTP; Sat, 27 Oct 2007 10:33:01 PDT X-Mailer: YahooMailRC/814.06 YahooMailWebService/0.7.134.12 Date: Sat, 27 Oct 2007 10:33:01 -0700 (PDT) From: Abdullah Ibn Hamad Al-Marri To: Julian Elischer , FreeBSD Current MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <753630.38293.qm@web33706.mail.mud.yahoo.com> Cc: Subject: Re: 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 17:59:41 -0000 ----- Original Message ----=0A> From: Julian Elischer = =0A> To: FreeBSD Current =0A> Sent: Saturday, October = 27, 2007 7:55:36 PM=0A> Subject: kthreads etc.=0A> =0A> The current kthread= s changes have been completed and seem to be=0A> working=0A> =0A ok..=0A> = =0A> I will over time change over a number of the current kproc users to=0A= > be=0A> =0A kthread users,=0A> but there is no reason that this need be li= mited to me..=0A> =0A> anyone working in code that uses kprocs can simply s= witch to=0A> using=0A> =0A kthreads by:=0A> =0A> 1/ checking that that modu= le doesn't NEED a process context (e.g.=0A> like=0A> =0A AIO does)=0A> =0A>= =0A> 2/ replace kproc_create(func, arg, proc**, flags, pages, fmt, fmtargs= )=0A> with=0A> kthread_add(func, arg, thread**, proc* flags, pages, fmt= , fmtargs)=0A> =0A> 2a/ change the pointer that used to be the proc * to be= a thread *.=0A> =0A> =0A> The extra proc* arg is a pointer to the process = to which the=0A> thread should be added. In general you will probably just = want to=0A> make=0A> =0A it NULL=0A> which will result in it nbeing added t= o proc0 which is now=0A> named=0A> =0A "kernel"=0A> =0A> 3/ replace any oth= er occurances of kproc with kthread.=0A=0A=0AThank you :D=0A=0A--=0A =0AReg= ards, =0A-Abdullah Ibn Hamad Al-Marri=0AArab Portal=0Ahttp://www.WeArab.Net= /=0A =0A=0A=0A=0A=0A__________________________________________________=0ADo= You Yahoo!?=0ATired of spam? Yahoo! Mail has the best spam protection aro= und =0Ahttp://mail.yahoo.com