[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

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

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.

Related Information

Logical File System Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]