> Sorry, can you give me more clue/detail on how to do that? What do you
> mean
> by 'can do it with a taskq function that never routines'? Do u mean
> taskq_create? However, I
> still need to somehow attach my routine with the thread. Without using
> taskq_dispatch,
> how else can I possibly do it?
I think there was a typo, replace "routines" with "returns". Call
taskq_dispatch() only once at startup, perhaps at the same time you'd
call SYSINIT in BSD. Your work thread would live for as long as your
module is in use (it it's a driver, while the driver is attached) and be
structured something like:
while (flags & keep_running) {
if (work_available)
do work
else
cv_wait
}
Other threads would do:
add work
cv_signal
Or to make the thread exit:
flags &= ~keep_running
cv_signal
-Artem
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code