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

timeoutcf Subroutine for Kernel Services

Attention: This service should not be used in AIX Version 4, because it is not multi-processor safe. The base kernel timer and watchdog services should be used instead. See talloc and w_init for more information.

Purpose

Allocates or deallocates callout table entries for use with the timeout kernel service.

Library

libsys.a (Kernel extension runtime routines)

Syntax

#include <sys/types.h>
#include <sys/errno.h>
int timeoutcf (cocnt)
int cocnt;

Parameter

cocnt Specifies the callout count. This value indicates the number of callout elements by which to increase or decrease the current allocation. If this number is positive, the number of callout entries for use with the timeout service is increased. If this number is negative, the number of elements is decreased by the amount specified.

Description

The timeoutcf subroutine is not part of the kernel. It is a compatibility service provided in the libsys.a library. To use the timeoutcf subroutine, a kernel extension must have been bound with the libsys.a library. The timeoutcf subroutine, like the associated kernel libsys services untimeout and timeout, can be bound and used only in the pinned part of a kernel extension or the bottom half of a device driver because these services use interrupt disable for serialization.

The timeoutcf subroutine registers an increase or decrease in the number of callout table entries available for the timeout subroutine to use. Before a subroutine can use the timeout kernel service, the timeoutcf subroutine must increase the number of callout table entries available to the timeout kernel service. It increases this number by the maximum number of outstanding time outs that the routine can have pending at one time.

The timeoutcf subroutine should be used to decrease the amount of callout table entries by the amount it was increased under the following conditions:

Typically the timeoutcf subroutine is called in a device driver's open and close routine. It is called to allocate and deallocate sufficient elements for the maximum expected use of the timeout kernel service for that instance of the open device.

Attention: A kernel panic results under either of these two circumstances:

Execution Environment

The timeoutcf subroutine can be called from the process environment only.

Return Values

0 Indicates a successful allocation or deallocation of the requested callout table entries.
-1 Indicates an unsuccessful operation.

Implementation Specifics

The timeoutcf subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The timeout kernel service.

Timer and Time-of-Day Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]