xref: /illumos-gate/usr/src/man/man9f/quntimeout.9f (revision 28b6fd27d5ff75fe6fdeb119a21575b0652a7e70)
te
Copyright 2006 Sun Microsystems.
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]
QUNTIMEOUT 9F "Jan 16, 2006"
NAME
quntimeout - cancel previous qtimeout function call
SYNOPSIS

#include <sys/stream.h>
#include <sys/ddi.h>



clock_t quntimeout(queue_t *q, timeout_id_t id);
INTERFACE LEVEL

Solaris DDI specific (Solaris DDI).

PARAMETERS
q

Pointer to a STREAMS queue structure.

id

Opaque timeout ID a previous qtimeout(9F) call.

DESCRIPTION

The quntimeout() function cancels a pending qtimeout(9F) request. The quntimeout() function is tailored to be used with the enhanced STREAMS framework interface, which is based on the concept of perimeters. (See mt-streams(9F).) quntimeout() returns when the timeout has been cancelled or finished executing. The timeout will be cancelled even if it is blocked at the perimeters associated with the queue. quntimeout() should be executed for all outstanding timeouts before a driver or module close returns. All outstanding timeouts and bufcalls must be cancelled before a driver close routine can block and before the close routine calls qprocsoff(9F).

RETURN VALUES

The quntimeout() function returns -1 if the id is not found. Otherwise, quntimeout() returns a 0 or positive value.

CONTEXT

The quntimeout() function can be called from user, interrupt, or kernel context.

SEE ALSO

mt-streams(9F), qbufcall(9F), qtimeout(9F), qunbufcall(9F)

Writing Device Drivers

STREAMS Programming Guide