Increments the open count for a specified file pointer.
#include <sys/types.h>
#include <sys/errno.h>
void fp_hold ( fp)
struct file *fp;
Item | Description |
---|---|
fp | Points to a file structure previously obtained by calling the fp_open, fp_getf, or fp_opendev kernel service. |
The fp_hold kernel service increments the use count in the file structure specified by the fp parameter. This results in the associated file remaining opened even when the original open is closed.
If this function is used, and access to the file associated with the pointer specified by the fp parameter is no longer required, the fp_close kernel service should be called to decrement the use count and close the file as required.
The fp_hold kernel service can be called from the process environment only.