Well, I actually do not know. The code I am writing does not really handle a certain device, so I guess a device driver is not what I am aiming at. A loadable module sounds ok to me.
How do I tell OpenSolaris that this module should be loaded? Is there any documentation regarding developing modules for OpenSolaris? Can a user also load and unload modules? Thanks, thomas On 5/2/07, Dana H. Myers <[EMAIL PROTECTED]> wrote:
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
