You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/04/06 04:35:09 UTC

[incubator-nuttx] branch master updated: modlib.h: Improve comments

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 70b1b51  modlib.h: Improve comments
70b1b51 is described below

commit 70b1b51ac909fce2c250f46050a2fdf00755be98
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Apr 6 11:34:33 2020 +0900

    modlib.h: Improve comments
---
 include/nuttx/lib/modlib.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/nuttx/lib/modlib.h b/include/nuttx/lib/modlib.h
index baf969e..1460fff 100644
--- a/include/nuttx/lib/modlib.h
+++ b/include/nuttx/lib/modlib.h
@@ -104,7 +104,7 @@
 
 /* This is the type of the function that is called to uninitialize the
  * the loaded module.  This may mean, for example, un-registering a device
- * driver. If the module is successfully initialized, its memory will be
+ * driver. If the module is successfully uninitialized, its memory will be
  * deallocated.
  *
  * Input Parameters:
@@ -113,7 +113,7 @@
  *
  * Returned Value:
  *   Zero (OK) on success; a negated errno value on any failure to
- *   initialize the module.  If zero is returned, then the module memory
+ *   uninitialize the module.  If zero is returned, then the module memory
  *   will be deallocated.  If the module is still in use (for example with
  *   open driver instances), the uninitialization function should fail with
  *   -EBUSY
@@ -121,10 +121,10 @@
 
 typedef CODE int (*mod_uninitializer_t)(FAR void *arg);
 
-/* The contect of this structure is returned by module_initialize().
+/* The content of this structure is filled by module_initialize().
  *
  *   uninitializer - The pointer to the uninitialization function.  NULL may
- *                   be returned if no uninitialization is needed (i.e, the
+ *                   be specified if no uninitialization is needed (i.e, the
  *                   the module memory can be deallocated at any time).
  *   arg           - An argument that will be passed to the uninitialization
  *                   function.
@@ -142,11 +142,11 @@ struct mod_info_s
 
 /* A NuttX module is expected to export a function called module_initialize()
  * that has the following function prototype.  This function should appear as
- * the entry point in the ELF module file and will be called by the binfmt
- * logic after the module has been loaded into kernel memory.
+ * the entry point in the ELF module file and will be called by the loader
+ * logic after the module has been loaded into memory.
  *
  * Input Parameters:
- *   modinfo - Module information returned by modlib_initialize().
+ *   modinfo - Module information to be filled by the initializer.
  *
  * Returned Value:
  *   Zero (OK) on success; a negated errno value on any failure to