Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2001 06:43:56 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        arch@freebsd.org
Subject:   kthread_* api pretty rough
Message-ID:  <20010114064356.Q7240@fw.wintelcom.net>

next in thread | raw e-mail | index | archive | help
I was pretty excited to see that we're using kthread_ stuff, however
actually using it is a bit more complex than I'd hoped.

There's a couple of questions that I didn't see answered in the
manpage:

1) how to actually start the thread?  kern/kern_idle.c and
kern/kern_intr.c both have somewhat different things that they
fiddle with in the proc struct returned by kthread_create.

2) is simply calling kthread_exit(); enough to clean up the thread?

3) what are the state of the locks when the thread runs initially?
what about what state they need to be in before calling kthread_exit()?

4) why we need to fiddle with the proc flags after starting a kthread
instead of having kthread_create do it for us.

5) do i really want to be using kproc_start instead of kthread_create?
I just want to run a couple of threads to do some microbenchmarks
on some code I'm testing.

6) shouldn't the stuff to OR with the process flags be made into
an arg to kthread_create?

thanks,
-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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