David,

Yah.  Just do this:

        static int _init(void)
        {
                /* your init code */
        }
        static void _fini(void)
        {
                /* your fini code */
        }

        module_init(_init);
        module_term(_fini);


--brian

On Wed, 03 Sep 2003, David Lehmann wrote:

> Hello,
> 
> Are there (or could there be) equivalents of  _init/_fini functions
> in Solaris?  i.e. I would like to know when module is loaded or unloaded
> for initialization and clean up.
> 
> -- 
> 
> David Lehmann                          Ulticom, Inc.
> AOL/Yahoo IM: davidULCM                1020 Briggs Road
> 1-856-787-2729                         Mt. Laurel, NJ 08054   USA
> 
> 
> _______________________________________________
> Linux-streams mailing list
> [EMAIL PROTECTED]
> http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

-- 
Brian F. G. Bidulock    � The reasonable man adapts himself to the �
[EMAIL PROTECTED]    � world; the unreasonable one persists in  �
http://www.openss7.org/ � trying  to adapt the  world  to himself. �
                        � Therefore  all  progress  depends on the �
                        � unreasonable man. -- George Bernard Shaw �

_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

Reply via email to