The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

init_module (9)
  • init_module (2) ( Linux man: Системные вызовы )
  • >> init_module (9) ( Linux man: Ядро )
  •  

    NAME

    init_module, cleanup_module - module load and unload functions
    
    
     
    

    SYNOPSIS

    #include <linux/module.h>
    #include <linux/modversions.h>

    int init_module(void);
    void cleanup_module(void);

     

    DESCRIPTION

    These functions are not part of the kernel but entry points into loadable modules. These are the only symbols that must be externally defined in order to load a module into a running kernel.

    When a module is loaded into a running kernel, the init_module(9) function within that object file is called to set up the module. The implementation of that function initializes local features and uses functions such as register_chrdev(9) to attach itself to the kernel. It then returns zero(0) if it succeeds. If there is a problem or the module decides that it cannot be loaded, it returns instead an error code (i.e. -ENODEV) and the kernel releases the module again.

    Once loaded, the cleanup_module(9) function of a module is used by the kernel to remove the module again. The module detaches itself from the kernel and returns.  

    RETURN VALUE

    The init_module(9) function returns 0 on success, or an error code <0 if the module cannot be initialized.  

    AVAILABILITY

    Linux 1.0+  

    SEE ALSO

    MOD_INC_USE_COUNT(9), insmod(1)

    Also list some source files for the kernel that implement the functions of the page.  

    AUTHOR

    Stephen Williams <steve@icarus.com>  

    BUGS

    It is entirely up to the driver to be sure it is detached from the kernel when unloaded. If a module makes an error in this regard, bad things may happen.


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    RETURN VALUE
    AVAILABILITY
    SEE ALSO
    AUTHOR
    BUGS


    Поиск по тексту MAN-ов: 




    Спонсоры:
    Inferno Solutions
    Ideco
    A-Real
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2021 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру