DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

poll(D2oddi)


poll -- poll a device

Synopsis

   void prefixpoll (int ps);

Description

The poll( ) entry point routine is called every clock tick in which the clock interrupted task-time processing. It is used to get information from the device without using interrupts.

Arguments


ps
integer that indicates the previous process's priority when it was interrupted by the system clock

Return values

None

Usage

Using the poll( ) routine can seriously degrade system performance because it causes an interrupt at every clock tick. When possible, drivers should use an intr(D2oddi) entry point routine instead. If the hardware doesn't generate interrupts, you can use timeout(D3oddi) to poll the device periodically (such as once every ten clock ticks) to lessen the impact on system performance.

Context and synchronization

Interrupt context. The driver may not block or access any process state information.

Hardware applicability

All

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

The poll( ) entry point routine is not supported in DDI. For STREAMS drivers, this functionality is handled transparently by the STREAMS head, and TTY drivers that call IOC_SELECT on SCO OpenServer are implemented as STREAMS drivers in DDI.

DDI 7 and earlier non-STREAMS drivers can implement similar functionality with the chpoll(D2) entry point routine.

chpoll( ) is not supported in DDI 8 and later versions. If your driver needs to periodically poll the hardware for certain conditions, you can implement this with the itimeout(D3) function or with the synchronization variables that are described in ``Synchronization variables'' in HDK Technical Reference.

External dependencies

Drivers that contain a poll( ) routine must have a p in the second column of the mdevice(F) file.

References

iopolldistributed(D3oddi), halt(D2oddi), intr(D2oddi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005