[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

fp_hold Kernel Service


Increments the open count for a specified file pointer.


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

int fp_hold (fp)
struct file *fp;


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.

Execution Environment

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

Return Values

0 Indicates a successful operation.
EINVAL Indicates that the fp parameter is not a valid file pointer.

Implementation Specifics

The fp_hold kernel service is part of Base Operating System (BOS) Runtime.

Related Information

Logical File System Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

[ Previous | Next | Contents | Home | Search ]