vnop_select Entry Point

Purpose

Polls a virtual node (v-node) for immediate I/O.

Syntax

int vnop_select (vp, correl, e, re, notify, vinfo, crp)
struct vnode * vp;
int  correl;
int  e;
int  re;
int (* notify)();
caddr_t  vinfo;
struct ucred * crp;

Parameters

Item Description
vp Points to the v-node to be polled.
correl Specifies the ID used for correlation in the selnotify kernel service.
e Identifies the requested event.
re Returns an events list. If the v-node is ready for immediate I/O, this field should be set to indicate the requested event is ready.
notify Specifies the subroutine to call when the event occurs. This parameter is for nested polls.
vinfo Is currently unused.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vnop_select entry point is invoked by the logical file system to poll a v-node to determine if it is immediately ready for I/O. This entry point is used to implement the select and poll subroutines.

File system implementation can support constructs, such as devices or pipes, that support the select semantics. The fp_select kernel service provides more information about select and poll requests.

Execution Environment

The vnop_select entry point can be called from the process environment only.

Return Values

Item Description
0 Indicates success.

Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.