fp_hold Kernel Service

Purpose

Increments the open count for a specified file pointer.

Syntax

#include <sys/types.h>
#include <sys/errno.h>

void fp_hold (
fp)
struct file *
fp;

Parameter

Item Description
fp Points to a file structure previously obtained by calling the fp_open, fp_getf, or fp_opendev kernel service.

Description

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.

Execution Environment

The fp_hold kernel service can be called from the process environment only.