DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
- The user enters the
rmcommand. The NSH parser recognizes thermcommand and transfers control to the NSH functioncmd_rm(). Wiki Markup {{cmd_rm()}} will verify the command, then call the standard POSIX {{unlink()}} interface. The logic of the VFS {{unlink()}} function in _\[nuttx_{{/fs/vfs/fs_unlink.c}} will then run.- The VFS's
unlink()will detect that the target to be removed is an a device node in the top-level pseudo-file system. It will call the device driver'sunlink()method and, in any event, it will remove the device node from the pseudo-filesystem. The underlying resources needed to support the device driver interface may, however, persist until the device driver decides to free those resources. - When the device driver's
unlink()method is called, it will determine if it is possible to free the device resources now. If so, it will free the device driver resources. But if, for example, there are clients of the device driver that still have open references to the device driver, it may defer freeing those resources until the last client has closed the device driver and there are no open references. In that case, it may simply set a flag indicating that the device driver has been unlinked. - If freeing of device driver resources has been deferred, then that flag will be examined later. For example, when the last client of the device driver has closed its reference to the driver it will check if the unlink operation has been deferred and, in that case, it will then free all of the device driver resources at that time.
...