module for kernel

Hans Petter Selasky hselasky at c2i.net
Sun May 20 13:04:33 UTC 2007


On Sunday 20 May 2007 14:36, Maxim Konovalov wrote:
> On Sun, 20 May 2007, 15:59+0330, Mohsen Pahlevanzadeh wrote:
> > Dear all,
> > When you wanna write a module for linux kernel,you have 2 function:
> > init_module() & cleanup_module()
> > But now i need to write a little module for FreeBSD kernel.Please guide
> > me.....
>
> Check /usr/share/examples/kld/ .

Also check out SYSINIT() :

  SYSINIT(id,SI_SUB_KLD,SI_ORDER_FIRST,usb_linux_register,p_usb_drv);
  SYSUNINIT(id,SI_SUB_KLD,SI_ORDER_ANY,usb_linux_deregister,p_usb_drv);

--HPS


More information about the freebsd-hackers mailing list