Thomas De Schampheleire wrote:
Hi all,

I will try using the timeout() first, but I am wondering where I should start the first invocation of my function.

The code I would like to run could be considered to be related to power management. Is there a certain file or function from where I should call my function? For this start, should I use a taskq then?
What module are you delivering your code in? If you're delivering a device driver, you'd probably initiate the thread as part of driver open(), and shut the thread the
down as part of driver close().  For a non-driver loadable module, you may
initiate the thread as part of the module attach() and shut the thread down as
part of the module detach().  In any case, for a loadable module, you must
make sure that the thread is shutdown before the module is unloaded or arrange to fail the unload. So the answer is, it really depends on what you are delivering
and what it needs to do.

Cheers,
Dana
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to