This file documents the system calls included as part of MODULES.


int create_module(const char *name, unsigned long size)

     This system call allocates space for a module.  Returns the address of
     the memory allocated.  -1 is returned if the allocation fails, if a
     module with the specified name already exists, or if the module name
     exceeds 64 characters.


int init_module(const char *name, void *code, unsigned codesize,
	struct mod_routines *routines)

     Initialize a module.  The code is copied into the kernel, starting
     four bytes after the address returned by create_module.  (The first
     four bytes of a module are reserved for the use count.)  The routines
     structure contains the addresses of the initialization and cleanup
     routines.  Init_module calls the initialization routine and records
     the address of the cleanup routine so it can be called when the module
     is deleted.


int delete_module(const char *name)

     Deletes the specified module.  The cleanup routine for the module is
     called.  If the use count of the module is zero, the module is deleted
     immediately.  Otherwise, the module is flagged as deleted, but
     continues to remain in memory.  After the use count has fallen to
     zero, the memory for the module will be freed by get_free_page when
     the kernel runs out of free pages.  Calling delete_module with an
     argument of NULL will also free any deleted modules whose use count is
     zero.


int get_kernel_syms(struct kernel_sym *buffer)

     This places definitions of kernel symbols into buffer (which must be
     large enoungh) and returns the number of symbol definitions.  If
     buffer is NULL, then it just returns the number of definitions.

     If a symbol definitions is missing from the table returned by
     get_kernel_syms, it must be added to the file kernel/ksyms.lst.


/proc/modules

     When read, this "file" returns a list of modules currently loaded into
     the kernel, along with their sizes.  Modules which have been creates
     but not initialized are flagged as "(uninitialized)".  Modules which
     have been deleted but are still in memory (because their use counts
     were not zero when they were deleted) are flagged as "(deleted)".
