| 1 | /*
|
|---|
| 2 | ============================================================================
|
|---|
| 3 | io.h -- Buchla 700 I/O library definitions
|
|---|
| 4 | Version 12 -- 1987-09-25 -- D.N. Lynx Crowe
|
|---|
| 5 | ============================================================================
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #pragma once
|
|---|
| 9 |
|
|---|
| 10 | #include "fspars.h" /* file system parameters */
|
|---|
| 11 | #include "stdint.h"
|
|---|
| 12 |
|
|---|
| 13 | struct devtabl;
|
|---|
| 14 | struct channel;
|
|---|
| 15 |
|
|---|
| 16 | typedef int16_t (*chclo)(io_arg arg);
|
|---|
| 17 | typedef int16_t (*devop)(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp);
|
|---|
| 18 |
|
|---|
| 19 | struct channel { /* channel table entry */
|
|---|
| 20 |
|
|---|
| 21 | int8_t c_read; /* read routine index */
|
|---|
| 22 | int8_t c_write; /* write routine index */
|
|---|
| 23 | int8_t c_ioctl; /* ioctl routine index */
|
|---|
| 24 | int8_t c_seek; /* seek routine index */
|
|---|
| 25 | chclo c_close; /* close function pointer */
|
|---|
| 26 | io_arg c_arg; /* argument to channel driver */
|
|---|
| 27 | };
|
|---|
| 28 |
|
|---|
| 29 | struct device { /* device control structure */
|
|---|
| 30 |
|
|---|
| 31 | int8_t d_read; /* read routine code */
|
|---|
| 32 | int8_t d_write; /* write routine code */
|
|---|
| 33 | int8_t d_ioctl; /* ioctl routine code */
|
|---|
| 34 | int8_t d_seek; /* seek routine code */
|
|---|
| 35 | devop d_open; /* special open function */
|
|---|
| 36 | };
|
|---|
| 37 |
|
|---|
| 38 | struct devtabl { /* device table entry */
|
|---|
| 39 |
|
|---|
| 40 | int8_t *d_name; /* device name */
|
|---|
| 41 | struct device *d_dev; /* pointer to device structure */
|
|---|
| 42 | io_arg d_arg; /* argument to device driver */
|
|---|
| 43 | };
|
|---|