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

iopolldistributed(D3oddi)


iopolldistributed -- register an xxpoll routine as distributed

Syntax

#include <sys/tty.h>

int iopolldistributed (int (*iopoll) ();

Description

iopolldistributed( ) registers an poll(D2oddi) routine as multithreaded.

Arguments


iopoll
Pointer to the poll(D2oddi) routine to be registered.

Return values

On success, iopolldistributed( ) returns 1; otherwise, it returns -1.

Usage

On hardware configurations that do not support distributed interrupts or on SCO UNIX systems before SCO OpenServer that do not support distributed interrupts, system performance may be improved by moving interrupt processing to an poll( ) routine that is called by the clock interrupt routine. All CPUs see clock interrupts, so moving processing to the driver's poll time provides better scalability. Careful structuring of locks and data structures will avoid contention for critical resources at clock interrupt time.

A better solution is to use timeout(D3oddi) to poll the device periodically, such as every ten clock ticks. This will lessen the performance degradation that can occur when a device is polled at every clock tick by the poll( ) routine.

Drivers that call iopolldistributed( ) must first call cdistributed(D3oddi) to register themselves as character multithreaded drivers.

Context and synchronization

Initialization context

Hardware applicability

All

Version applicability

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

SVR5 DDI compatibility

This function is not supported for DDI drivers. Drivers for devices that do not generate interrupts should be written to use the timeout(D3oddi) function to poll the device periodically.

References

cdistributed(D3oddi), idistributed(D3oddi), tc_tlock(D3oddi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005