Date: Sat, 27 Oct 2007 10:33:01 -0700 (PDT) From: Abdullah Ibn Hamad Al-Marri <wearabnet@yahoo.ca> To: Julian Elischer <julian@elischer.org>, FreeBSD Current <current@freebsd.org> Subject: Re: kthreads etc. Message-ID: <753630.38293.qm@web33706.mail.mud.yahoo.com>
index | next in thread | raw e-mail
----- Original Message ---- > From: Julian Elischer <julian@elischer.org> > To: FreeBSD Current <current@freebsd.org> > Sent: Saturday, October 27, 2007 7:55:36 PM > Subject: kthreads etc. > > 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. Thank you :D -- Regards, -Abdullah Ibn Hamad Al-Marri Arab Portal http://www.WeArab.Net/ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.comhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?753630.38293.qm>
