Hi all,

    I have managed to kernelised our network application into FreeBSD  
and worked very well. Now, I start the same process on OpenSolaris.  
Although I have got the Solaris Internal book with me, it really  
explains how everything works together. What I need is some tutorial  
or example on how to use kernel functions

On FreeBSD, I can do something like

SYSINIT(foo, ..);

void foo(void *bar) {

   .....
   kthread_create(my_func, ....);
}


void my_func(void *arg) {

    while (1) {

       do something

       sleep until timeout or wakeup by another signal
    }
}

where SYSINIT is to dispatch kernel thread at startup

Here is the link of man page of kthread_create, 
http://www.FreeBSD.org/cgi/man.cgi?query=kthread_create&apropos=0&sektion=0&manpath=FreeBSD+6.3-stable&format=html

Here is the link of the info and showing how to use SYSINIT, 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/sysinit.html

I would be appreciate if anyone can point me to any document/source  
file/man pages/anything on the usage of creating a kernel thread using  
thread_create and also the equivalent mechanism of SYSINIT in  
OpenSolaris.

Many many thanks in advance.
Joe
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to