00001 /************************************************************************* 00002 ** C version of CIO 00003 ** Copyright (c) 1991 Jim Patchell 00004 ** 00005 ** This is the Central Input Output device handler. This is probably 00006 ** a lame attempt to make access to various I/O devices a little more 00007 ** orthagonal. Maybe, maybe not. 00008 ** 00009 ** The interface function, cio only requires one parameter, but accepts 00010 ** a variable number of parameters depending on the type of function 00011 ** it is that is being executed. 00012 ** 00013 ** The functions that can be executed are: 00014 ** 00015 ** add handler 00016 ** open 00017 ** close 00018 ** get 00019 ** get record (read) 00020 ** put 00021 ** put record (write) 00022 ** status 00023 ** special command (xio) 00024 ** 00025 ** 00026 **************************************************************************/ 00027 00028 #include <stdio.h> 00029 #include <stdlib.h> 00030 #include <string.h> 00031 #include "cio.h" 00032 #include "task.h" 00033 00034 int CioStatus(IOCB *I,int mode) 00035 { 00036 /* 00037 ** This is where a status call is handled 00038 ** 00039 ** called as: cio(iocb,mode) 00040 ** 00041 */ 00042 return((*htabs[I->ichid].HtabsEntry->statv)(I,mode) ); 00043 }