Download Coherent Device Driver Kit

Transcript
altclk outQ - at
59
I * install h igh-speed polling of I /O device * /
poll_rate
;
scale_factor = pol l_rate/HZ ;
altc lk_out ( ) ;
altclk_in ( poll_rate , poll_fn ) ;
�
•
•
•
I * polling function * /
int poll_fn ( )
{
static int count ;
•
•
•
do device polling
•
•
•
count++ ;
if ( count >= scale_factor )
count = 0 ;
return count ;
}
See Also
accessible kernel routines, altclk_out
Notes
To use this function, link module clocked.o into the kernel. Avoid naming the polling function
altclk: there is already a kernel symbol with this name.
altclk_outO - Accessible Kernel Function
Uninstall polling function
int (•altclk_out) Q:
altclk_outQ ends polling (previously installed with function altclk_in). It restores the COHERENT
clock rate to the value of the manifest constant HZ (at present. 1 00 Hertz) and unhooks the polling
function. It returns the value of the previous pointer to the polling function.
Calling altclk_out when polling is not already in effect does not affect the system: the function
simply does nothing and returns NULL. To change polling rate, call altclk_out, then altclk_in.
See Also
accessible kernel routines, alkclk_in
Notes
To use this function, link module clocked.o into the kernel. Avoid naming the polling function
altclk: there is already a kernel symbol with this name.
at - Device Driver
Drivers for hard-disk partitions
/ dev/at• are the COHERENT system's AT devices for the hard-disk's partitions . Each device is
assigned major-device number 1 1 . and may be accessed as a block- or character-special device.
The at hard-disk driver handles two drives with up to four partitions each. Minor devices 0
through 3 identify the partitions on drive 0. Minor devices 4 through 7 identify the partitions on
drive 1 . Minor device 1 2 8 allows access to all of drive 0. Minor device 129 allows access to all of
drive 1 . To modify the offsets and sizes of the partitions, use the command fdisk on the special
device for each drive (minor devices 128 and 1 29).
LEXICON