Copyright (c) 2003, Sun Microsystems, Inc., All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <sys/sunldi.h> int ldi_poll(ldi_handle_t lh, short events, int anyyet, short *reventsp, struct pollhead **phpp);
Layered handle.
Potential events. Valid events are: POLLIN
Data other than high priority data may be read without blocking.
Normal data may be written without blocking.
High priority data may be received without blocking.
Device hangup has occurred.
An error has occurred on the device.
Normal data (priority band = 0) may be read without blocking.
Data from a non-zero priority band may be read without blocking.
Data other than high priority data may be read without blocking.
Priority data (priority band > 0) may be written.
A flag that is non-zero if any other file descriptors in the pollfd array have events pending. The poll(2) system call takes a pointer to an array of pollfd structures as one of its arguments. See poll(2) for more details.
Pointer to a bitmask of the returned events satisfied.
Pointer to a pointer to a pollhead structure.
The ldi_poll() function passes a poll request to the device entry point for the device specified by the layered handle. This operation is supported for block, character, and streams devices.
The ldi_poll() function returns 0 upon success. If a failure occurs before the request is passed on to the device, possible return values are: EINVAL
Invalid input parameters.
Operation is not supported for this device.
These functions may be called from user or kernel context.