Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2007 09:55:36 -0700
From:      Julian Elischer <julian@elischer.org>
To:        FreeBSD Current <current@freebsd.org>
Subject:   kthreads etc.
Message-ID:  <47236D88.5070109@elischer.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47236D88.5070109>