发明名称 System for I/O management where I/O operations are determined to be direct or indirect based on hardware coupling manners and/or program privilege modes
摘要 The system and method simplifies communication between a computer control program executing on the computer system and an input/output device coupled to the computer system and is independent of the privilege mode in which the computer program is executing and of the manner in which the input/output device is coupled to the computer system, namely directly such as via an expansion bus versus indirectly such as via a parallel port. An I/O manager provides input/output operation macros, comprising first and second conditional execution portions, along with other related functions. The computer program is compiled from one or more source code files, wherein the source code files employ the input/output operation macros and call other I/O manager functions. The system and method comprises a preprocessor resolving the first conditional execution portion of an input/output operation macro into a direct input/output instruction if compiled for an execution environment with sufficient privilege level and resolving the first conditional execution portion of the macro to a call to a function otherwise. The function causes the computer system to change to kernel mode and executes a direct input/output instruction. The system and method further comprises executing the compiled computer program comprising allocating memory for and populating an instance of a data structure for the I/O manager and determining whether or not the input/output device is coupled to the computer system such that the input/output device registers are directly accessible to the computer program through a direct input/output instruction. Next, the input/output operation to the input/output device is performed by executing the first conditional execution portion of the input/output operation macro to the input/output device if the input/output device is directly coupled to the computer system or executing the second conditional execution portion of the input/output operation macro, which is a function, if the input/output device is not directly coupled to the computer system, wherein the function performs the input/output operation by executing a plurality of direct input/output instructions.
申请公布号 US5925109(A) 申请公布日期 1999.07.20
申请号 US19960630387 申请日期 1996.04.10
申请人 NATIONAL INSTRUMENTS CORPORATION 发明人 BARTZ, CHRISTOPHER T.
分类号 G06F9/45;(IPC1-7):G06F13/14 主分类号 G06F9/45
代理机构 代理人
主权项
地址
您可能感兴趣的专利