RTX的编程接口 下载本文

体系架构

RTX的架构

Win32进程连接到RTX的Rtapi_w32Win32进程Win32子系统用户模态(Ring 3)内核模态(Ring 0)RTSS进程或RTDLLRtxcpipWindows内核&设备驱动RT-TCP/IP栈RTSS进程或RTDLLRtxUsbRTX USB栈RTSS进程或RTDLLRTX-RTSS(实时子系统)Win32子系统RTX HAL扩展x86硬件平台 RTX添加一个实时子系统, 即所谓的RTSS,到Windows (参见上面的图) 。RTSS 与其它Windows子系统是概念性相似(譬如Win32, POSIX,和DOS) 因为它支持其自己的执行环境和API 。但在一个重要区域RTSS是不同的:不是使用Windows调度程序, RTSS执行其自己实时线程调度。此外, 在单处理机环境里, 所有RTSS 线程调度在所有Windows调度之前发生, 包括Windows管理的中断和延迟的过程调用(DPCs) 。

实时进程间通信

RTSS也支持能被RTSS或Win32进程操纵的进程间通信对象(IPC)。这使得在实时和非实时程序之间,简单标准的通信和同步成为可能。最后, RTSS 提供其它时间关键服务- 譬如对RTSS 进程实施时钟,定时器和中断管理。 HAL 扩展名

RTX 包括一个实时使能的硬件抽象层(HAL)扩展。这个扩展在RTSS 和Windows之间维护中断隔离。 Windows无法屏蔽(在中断控制级别) 由RTSS 管理的中断。 Windows中断在RTSS 处理期间被屏蔽。 实时HAL 扩展名支持关于RTSS的高分辨率时钟和定时器, 当它和支持关于Windows的非实时钟和定时器。 其它实时HAL 扩展名功能包括在RTSS 和Windows之间的一个软件中断机制, 基本的异常管理, 和各种各样的改进都是为了确定性。 单处理机和多处理机系统

RTX 支持单处理机和多重处理机都运行于 Windows的系统。 RTX 的运行时版本, 它支持多重处理机系统, 提供单处理机版本的所有功能, 它利用英特尔MPS兼容的多重处理机系统,在Windows和RTX 环境提供改善的性能。

运行RTX,为多重处理机系统, 实施一个专用的处理器模型。在这个模型中, RTSS 运行在一个处理器, 当其余的处理器继续运行在Windows系统。 多重处理机HAL在Windows起动次序期间获取最后逻辑处理器的控制。它为RTSS保留 。RTSS 程序可能被装载,然后被在专用处理器中执行。

关于Win32 和RTSS 进程的RTX 应用程序编程接口, 包括浮点单元(FPU) 和结构化的异常处理, 被单处理机和多重处理机系统使用。这消除了为一个多处理机平台重新编码RTX(单处理机)应用软件的需要。

应用程序设计接口(API)

RTX API 是基于Win32 API的。开发人员借鉴Win32 经验, 编码基础, 和开发工具, 和加速坚硬实时应用的开发。 Win32 和RTSS 进程支持全部的RTX API, 但是, 用不同的反应时间和性能特性- 在开发环境之间允许开发人员共享或移动代码。

Win32 和实时API

RTX 支持一个子集Win32 API 功能, 它提供一套特殊实时功能, 通认作为RTAPI

(实时API) 。 RTAPI 函数用\作为函数名的前缀。 某些RTAPI 函数与Win32 中与之对应的语义是相同的,但其他的是RTX(例如, 没有相似的Win32 调用)独有的。例如, RTAPI IPC函数与Win32 IPC函数的不同只在于他们运行的IPC 命名空间和在决定性可能以实时IPC 对象。 另一方面, Win32 API 不包括任何与中断管理有关的函数; 因此, 唯一中断管理函数被定义在RTAPI 。

对RTX API 的仔细的选择促进实时应用组件的高效率的开发。 RTX不包括Win32 功能, 譬如与GUI 相关的调用, 一般有时间要求不严格的应用程序组件使用。 实际上, Win32函数对于实时编程不是必需的, 和不切实际执行确定性行为, 不被包括在RTX API 。多数应用程序至少有两个进程一起工作- 一个基于Win32 的进程(利用GUI 和其它Win32-only 函数) 和一个基于RTSS 的进程执行时间严格的处理。

实时程序库

RTX 支持各种各样的运行时库, 并且提供基于MS Visual C++ 的' C ' 运行时库。 RTSS 进程可能静态被链接包含这些库, 只要他们不尝试链接到不受支持的Win32函数。 RTSS 进程链接到专用版本的动态连接库(DLLs 的),这些可能被使用模块化应用程序代码或提供实时软件环境的运行时定制。

Unicode

RTX 支持Unicode 应用程序。 RTSS 进程可能使用wmain() 函数和接受广义字符输入变量。 支持函数WCS 系列,这些作为RTX 支持的C 运行时库一部分。

API

进程线程管理

进程和线程

一个进程包含一个地址空间,对象句柄,和一个或多个执行(线程)路径。线程被用于响应中断和处理线程上下文中进程相关的异步事件。RTSS和Win32的进程和线程只能进入他们自己的环境中的进程和线程。

1.RtGetThreadPriority

RtGetThreadPriority返回一个指定线程的优先权值。

2.RtSetThreadPriority

RtSetThreadPriority设置一个指定线程的优先权值。

系统内存管理

系统内存分配:进程频繁地分配追加的内存去执行他们的操作。RTX内存分配例行程序总是分配被锁定的内存。

1.RtAllocateLockedMemory

RtAllocateLockedMemory为避免内存使用时的分页错误,提交和锁定指定数量的内存。

2.RtFreeLockedMemory

RtFreeLockedMemory释放之前被RtAllocateLockedMemory提交和锁定的内存。

3.RtLockProcess

RtLockProcess将进程虚拟地址空间的某个部分锁定到物理内存。

4.RtUnlockProcess

RtUnlockProcess解锁锁定到物理内存的进程虚拟地址空间的那部分。

5.RtCommitLockProcessHeap

RtCommitLockProcessHeap提交和锁定系统进程堆去避免堆使用时的分页错误。

6.RtCommitLockHeap

RtCommitLockHeap提交和锁定堆去避免堆使用时的分页错误。

7.RtCommitLockStack

RtCommitLockStack提交和锁定指定栈去避免栈使用时的分页错误。

8.RtLockKernel

RtLockKernel锁定windows内核的虚拟地址空间的某个部分到物理内存。

9.RtUnLockKernel

RtUnLockKernel解锁之前被锁定到物理内存的windows内核的部分。

本地内存

本地内存是实现RTSS应用程序内存请求的一个RTX确定性分配的内存池。从本地池分配内存RTSS应用程序不必为了请求Windows内存而去初始化一个服务请求中断(Service Request Interrupt (SRI))。当第一个RTSS应用程序开始并为一般非确定性函数提供确定性行为的时候,本地内存池将被创建。 1.RtAllocateLocalMemory

RtAllocateLocalMemory从先前分配的RTSS 确定性内存池分配内存去避免SRI活动。

时钟和定时器

实时系统需要大量的操作系统时间服务请求。操作系统必须维护一个精确次数的时间和时间表线程页的精确记账,挂起一个精确间隔的线程。 1.RtGetClockTime

RtGetClockTime获得指定时钟的当前值。

2.RtSetClockTime

RtSetClockTime设置一个指定时钟的当前值。

3.RtGetClockResolution

RtGetClockResolution获得一个指定时钟的resolution。

4.RtGetClockTimerPeriod

RtGetClockTimerPeriod获得一个指定时钟的最小定时器周期。RtGetClockTime调用传送100ns的64位流量时间

5.RtGetRtssTimeAsFileTime

RtGetRtssTimeAsFileTime得到RTSS时间的当前值。

6. RtSetRtssTimeAsFileTime

RtSetRtssTimeAsFileTime设置RTSS时间的最新值

进程间通信

对象名字

它为进程共享对象句柄提供一种简易的方式。由创建进程指定的名字受RTX_MAX_PATH 字符限制,它包括除了反斜杠路径分隔符(\\)以外的任何字符。一旦进程创建了有名字的活动, 互斥变量, 信号量, 或共享内存对象, 其它进程可使用这个名字调用适当的功能(RtOpenEvent, RtOpenMutex, RtOpenSemaphore, 或RtOpenSharedMemory) 打开对象的句柄。 命名会区分大小写。

RtOpenEvent:返回现有的命名事件对象的句柄

RtOpenMutex:返回命名的RTSS互斥变量的句柄

RtOpenSemaphore:返回现有的命名的信号量对象的句柄

RtOpenSharedMemory:打开一个命名的物理映射的对象

RtCreateMutex:创建一个RTSS互斥变量。对这个新创建的互斥变量对象,返回一个句柄。 共享内存

RTSS 共享内存对象是非页式物理内存区域,可以映射到进程的虚拟地址空间。 当一个共享内存对象有了名字, 另外的进程可以进行内存映射。 通过句柄和虚拟地址来访问共享内存对象。

RtCreateSharedMemory:创建一个物理内存的命名区域,它能映射到任何进程中去。

RtOpenSharedMemory:打开一个命名的物理映射对象 信号量对象

RTSS信号量对象是一个同步对象,维护在零到指定最大值之间的计数。 每当线程完成一次信号量对象的等待,计数减一; 当信号量释放时,记数增加可变数量。 当计数到达零, 信号量对象的状态不再受信,并且直到一些线程数增加计数,其他线程数才完成对信号量对象的等待。

RtCreateSemaphore:创建一个命名的或未命名的信号量对象

事件对象

事件对象是同步对象,其状态可通过调用RtSetEvent 或RtPulseEvent明确地被设置为受信状态。事件对象的二种类型是:Manual-reset event 和Auto-reset event

事件对象在给线程发信号,表明一个特殊事件发生了时相当有用。

RtSetEvent:设置指定事件对象的状态为受信状态

RtPulseEvent:提供单一的操作,来设置(信号化)指定事件对象,然后在释放适当数量的等待线程后,将事件重置(设置为无信号状态)。 RtResetEvent:将指定事件对象的状态设置为无信号

RtWaitForSingleObject:当下面的情况之一发生时,返回: 指定对象处于受信状态 超时时间间隔到期

RtCreateEvent:创建一个命名的或未命名的事件对象

互斥对象:RTSS互斥对象是一个同步对象,当它不属于任何线程时,它的状态时受信的;当互斥量被一个线程拥有时,它处于非受信状态。互斥变量仲裁独占访问共享资源。 RtReleaseMutex:放弃一个RTSS互斥量的所有权

设备管理 中断

RTX中断管理提供使能一个应用程序能够很好的满足中断请求从设备访问计算机。

RtAttachInterrupt 允许用户使中断服务线程和中断服务请求跟基线或者基于消息的硬件中断关联。

RtAttachInterruptVectorEx 允许用户使中断服务线程和中断服务请求跟共享的或者非共享的硬件中断关联。

RtAttachInterruptVector 允许用户使在用户区句柄历程跟一个中断关联。 RtReleaseInterrupt 通过使用RtAttachInterrupt发布一个先前附着的中断。 RtReleaseInterruptVector 发布一个先前附着的中断

RtQueryPciMsiCapability 允许用户查询一个PCI设备判断这个设备是否有MSI或者MSI-X能力。

RtDisableInterrupts 在一个RTSS环境,RtDisableInterrupts让所有的中断不能用 RtEnableInterrupts 使能所有的用户级的中断。

端口IO

实时系统请求控制、读、写数据到硬件设备。RTX端口I/O编程接口允许数据在一个处理器的I/O空间移动只在用户进程不需要转化到一个内核模式编码。

RtEnablePortIo 能够直接从用户设备上下文对I/O端口访问。 RtDisablePortIo 不能够从用户设备上下文直接对I/O端口访问

RtReadPortUchar,RtReadPortUshort,RtReadPortUlong 从端口读数据

RtWritePortUchar,RtWritePortUshort,RtWritePortUlong 直接写数据到端口

RtReadPortBufferUchar,RtReadPortBufferUshort,RtReadPortBufferUlong 从端口直接读数据拷贝到缓存。

RtWritePortBufferUchar,RtWritePortBufferUshort,RtWritePortBufferUlong 从缓存拷数据写到端口。

物理内存映射

存在的I/O区域依赖于处理处体系结构。端口映射到内存地址,这些体系结构能够使用内存映射函数使能够访问物理内存对于控制器和其他硬件设备。

RtMapMemory 映射一大片的物理内存地址到用户虚拟地址空间。 RtUnmapMemory 释放映射。

连续的内存映射

某种设备请求他们的缓冲区重新连续分配物理内存空间在CPU地址空间。这些设备必须使用真实的物理地址访问内存缓冲而不是通过虚拟的地址。 RtAllocateContiguousMemory 分配物理连续内存。 RtFreeContiguousMemory 释放先前分配的连续内存

RtGetPhysicalAddress 在RTSS环境中提供所有的内存分配方式,在Windows中它只提供连续的内存分配。

总线IO

RtGetBusDataByOffset 获得详细的

RtTranslateBusAddress 转化一个具体的总线地址到相关的系统逻辑地址

RtSetBusDataByOffset 为设备设置总线配置数据在一个动态配置IO总线以一个公布的标准的接口。

文件IO

使用的都是Windows的API,并且必须使用绝对路径在RTX环境下。

异常管理API

RtAttachShutdownHandler 注册一个停止通知句柄函数。这个句柄函数调用自己的线程当系统停止事件发生的时候。

RtReleaseShutdownHandler 毁坏由RtAttachShutdownHandler.创建的关闭句柄对象

常用API

RtAtoi 把string值转化为int

RtCloseHandle 关闭打开的对象句柄

RtIsInRtss 如果调用的进程正在运行返回true RtPrintf 打印标准化格式输出到控制台 RtWPrintf打印标准化格式输出到控制台 RtWtoi把string值转化为int

被支持函数的准则

关于准则

矩阵提供关于支持RTX APIs的技术信息。矩阵提供:

? 实时函数 ? Win32支持函数 ? C 库支持函数 ? C++库支持函数 ? RTK函数 Key

以下key解释表中的“Notes”列

Notes码 1 含义 Rt的优先级是从0到127, 然而Win32 范围 是Windows上的 {-15, -2, -1, 0, 1, 2, 15}. RTX IPC 命名空间 独立于 Win32 命名空间. 调用被一个 Rt 调用和一个 Win32 调用支持 (e.g. RtAtoi 和 Atoi). 不能被所有的 RTSS DLL使用. C/C++运行时调用不在共享的RTDLL中支持. No 表示 调用 不是确定的. ? Yes表示 调用的运行时间 少于5微秒. RTSS中的确定性函数 工作在 Windows 停止屏. ? Yes* 表示 调用对小规模输入有确定性 ? Unknown 表示如果调用是确定性的,就不可能知道。因为调用参考的对象不是总能被知道的。 ? 2 3 4 5 确定性

实时函数矩阵

RTAPI 函数名称 RtAllocateContiguousMemory Notes Deterministic? RtAllocateLocalMemory RtAllocateLockedMemory RtAtoi RtAttachInterruptVector RtAttachInterruptVectorEx RtAttachShutdownHandler RtCancelTimer RtCloseHandle RtCommitLockHeap RtCommitLockProcessHeap RtCommitLockStack RtCreateEvent RtCreateMutex RtCreateProcess RtCreateSemaphore RtCreateSharedMemory RtCreateTimer RtDeleteTimer RtDisableInterrupts RtDisablePortIo RtEnableInterrupts RtEnablePortIo RtFreeContiguousMemory RtFreeLocalMemory RtFreeLockedMemory RtGetBusDataByOffset RtGetClockResolution RtGetClockTime RtGetClockTimerPeriod GetExitCodeProcess RtGetPhysicalAddress RtGetRtssTimeAsFileTime RtGetThreadPriority 1 3 2 2 2 , 3 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes RtGetTimer RtIsInRtss RtLockKernel RtLockProcess RtMapMemory RtOpenEvent RtOpenMutex RtOpenProcess RtOpenSemaphore RtOpenSharedMemory RtPrintf RtPulseEvent RtQueryLocalMemory RtReadPortBufferUchar RtReadPortBufferUlong RtReadPortBufferUshort RtReadPortUchar RtReadPortUlong RtReadPortUshort RtReleaseInterruptVector RtReleaseMutex RtReleaseSemaphore RtReleaseShutdownHandler RtResetEvent RtSetBusDataByOffset RtSetClockTime RtSetEvent RtSetRtssTimeAsFileTime RtSetThreadPriority RtSetThreadTimeQuantum RtSetTimer RtSetTimerRelative RtSleepFt 1 2 2 2 3 2 2 2 2 2 , 3 Yes Yes Yes Yes** Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes RtTerminateProcess RtTranslateBusAddress RtUnlockKernel RtLockProcess RtUnmapMemory RtWaitForMultipleObjects RtWaitForSingleObject RtWPrintf RtWritePortBufferUchar RtWritePortBufferUlong RtWritePortBufferUshort RtWritePortUchar RtWritePortUlong RtWritePortUshort RtWtoi Win32支持 函数矩阵

Win32 Function Name AbnormalTermination CloseHandle CreateDirectory CreateFile CreateThread DeleteCriticalSection DeleteFile DeviceIoControl DllMain EnterCriticalSection ExitProcess ExitThread 3 3 Yes Yes Yes Yes Yes Yes Yes Yes Yes Notes Deterministic? Yes FileTimeToLocalFileTime FileTimeToSystemTime FreeLibrary GetCurrentProcessId GetCurrentProcessorNumber GetCurrentThread GetCurrentThreadId GetExceptionCode GetExceptionInformation GetExitCodeThread GetLastError GetProcAddress GetProcessHeap GetLocalTime GetSystemTime GetThreadPriority GetTimeZoneInformation HeapAlloc HeapCreate HeapDestroy HeapFree HeapReAlloc HeapSize InitializeCriticalSection LeaveCriticalSection LoadLibrary LocalFileTimeToFileTime RaiseException 1 , 3 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ReadFile RemoveDirectory ResumeThread SetEndOfFile SetFilePointer SetLastError SetThreadPriority SetUnhandledExceptionFilter Sleep SuspendThread SystemTimeToFileTime TerminateThread TlsAlloc TlsFree TlsGetValue TlsSetValue UnhandledExceptionFilter WriteFile

1 , 3 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes C 库支持函数矩阵

C 库函数名 abs acos asin atan atan2 atof atoi 3 Notes 5 5 5 5 5 5 , 5 Deterministic? Yes Yes Yes Yes Yes Yes Yes atol bsearch calloc ceil cos cosh difftime div exit exp fabs fclose fflush fgets floor fmod fopen fprintf(stderr) fputc fputs fread free frexp fseek ftell fwrite getc isalnum isalpha iscntrl isdigit isgraph islower isprint 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 , 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 Yes Yes* Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ispunct isspace isupper iswalnum iswalpha iswascii iswcntrl iswctype iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper iswxdigit isxdigit labs ldexp ldiv log log10 longjmp main malloc memchr memcmp memcpy memmove memset modf perror pow printf 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 , 5 5 , 4 , 5 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes* Yes* Yes* Yes Yes Yes putc putchar qsort rand realloc rewind setjmp signal sin sinh sprintf sqrt srand sscanf strcat strchr strcmp strcpy strcspn strerror strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtol strtoul tan tanh 3 5 5 5 5 5 5 5 5 5 5 , 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 , 5 Yes* Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes* Yes Yes Yes Yes Yes* Yes* Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes tolower toupper towlower towupper ungetc va_start vsprintf wcscat wcschr wcscmp wcscpy wcscspn wcsftime wcslen wcsncat wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcsstr wcstod wcstok wcstol wcstoul wmain wprintf wtof wtoi wtol _controlfp _fpreset

5 5 5 5 5 5 4 , 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 , 4 5 3 , 5 5 5 5 , 5 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes* Yes* Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes C++ 标准模板 库调用矩阵

以下 C++ 标准模板库 (STL) 调用 在 RTSS 环境中支持. accumulate generate ostream ostream_iterator ostringstream pair partial_sort partial_sort_copy partial_sum partition stable_sort binary_negate binary_search bind1st binder2nd bsappend cerr clog copy copy_backward count count_if cout insert insert_iterator istream_iterator pointer_to_unary_funstrgrtthan istringstream ction stringbuf iter_swap prev_permutation stringstream less priority_queue strlesseq less_equal ptr_fun strlessthan lexicographical_cpush_heap ompare strneq random_shuffle logical_and strplus remove logical_not swap remove_copy logical_or swap_ranges remove_copy_if plus streq pointer_to_binary_function strgrteq setfill setprecision setw size sort sort_heap stable_partition adjacent_differegenerate_n nce greater adjacent_find greater_equal advance ifstream back_insert_iterincludes ator back_inserter basic_string inner_product inplace_merge divides equal equal_range equal_to filebuf fill fill_n find find_end find_first_of find_if findfrstof for_each lower_bound make_heap max max_element merge min min_element minus mismatch modulus multiplies negate remove_if replace replace_copy replace_copy_if replace_if reverse reverse_copy rotate transform unique unique_copy upper_bound wcerr wclog wistringstream wostream rotate_copy search search_n set_difference wostringstream wstringstream next_permutation set_intersection set_symmetric_difference set_union setbase front_insert_itenot_equal_to rator nth_element front_inserter ofstream fstream

RTK API 函数矩阵

RTK 函数只能被Windows的设备驱动程序使用; 它们对于 RTX 应用程序是不可用的. RTK API 函数名 RtkCloseHandle RtkCreateEvent Notes 2 RtkCreateMutex RtkCreateSemaphore RtkCreateSharedMemory RtkOpenEvent RtkOpenMutex RtkOpenSemaphore RtkOpenSharedMemory RtkPulseEvent RtkReleaseMutex RtkReleaseSemaphore RtkResetEvent RtkRtssAttach RtkRtssDetach RtkSetEvent

2 2 2 2 2 2 2 2 2 2 实时和Window32接口的函数分组 异常管理的接口 异常管理 实时函数 RtAttachShutdownHandler RtReleaseShutdownHandler AbnormalTermination GetExceptionCode GetExceptionInformation RaiseException SetUnhandledExceptionFilter UnhandledExceptionFilter

异常管理 Win32-支持的函数 时钟与定时器的接口 时钟与定时器 实时函数 RtCancelTimer RtCreateTimer RtDeleteTimer RtGetClockResolution RtGetClockTime RtGetClockTimerPeriod RtGetRtssTimeAsFileTime RtGetTimer RtSetClockTime RtSetRtssTimeAsFileTime RtSetTimer RtSetTimerRelative RtSleepFt

时钟与定时器 Win32-支持的函数 FileTimeToLocalFileTime FileTimeToSystemTime GetLocalTime GetSystemTime GetTimeZoneInformation LocalFileTimeToFileTime Sleep 常规使用的接口 常规使用 实时函数 RtAtoi RtCloseHandle RtIsInRtss RtPrintf 常规使用 Win32-支持的函数 CloseHandle CreateDirectory CreateFile DeleteCriticalSection RtWPrintf RtWtoi DeleteFile DeviceIoControl DllMain EnterCriticalSection FreeLibrary GetLastError GetProcAddress InitializeCriticalSection LeaveCriticalSection LoadLibrary ReadFile RemoveDirectory SetFilePointer SetLastError WriteFile 中断服务的接口 中断服务 实时函数 RtAttachInterrupt RtAttachInterruptVector RtAttachInterruptVectorEx RtDisableInterrupts RtEnableInterrupts RtQueryPciMsiCapability RtReleaseInterrupt RtReleaseInterruptVector 进程间通信(IPC)接口 进程间通信 实时函数 RtCreateEvent RtCreateMutex RtCreateSemaphore RtCreateSharedMemory RtOpenEvent RtOpenMutex RtOpenSemaphore RtOpenSharedMemory RtPulseEvent RtReleaseMutex RtReleaseSemaphore RtResetEvent RtSetEvent RtWaitForMultipleObjects RtWaitForSingleObject

内存接口 内存 内存 实时函数 RtAllocateContiguousMemory RtAllocateLockedMemory RtCommitLockHeap RtCommitLockProcessHeap RtCommitLockStack RtCreateSharedMemory RtFreeContiguousMemory RtFreeLockedMemory RtGetPhysicalAddress RtLockKernel RtLockProcess RtMapMemory RtUnlockKernel RtUnlockProcess RtUnmapMemory Win32-支持的函数 GetProcessHeap HeapAlloc HeapCreate HeapDestroy HeapFree HeapReAlloc HeapSize 端口和总线IO 接口 端口和总线IO 实时函数 RtDisablePortIo RtEnablePortIo RtGetBusDataByOffset RtReadPortBufferUchar, Ushort, Ulong RtReadPortUchar, Ushort, Ulong RtSetBusDataByOffset RtTranslateBusAddress RtWritePortBufferUchar, Ushort, Ulong RtWritePortUchar, Ushort, Ulong 进程和线程 接口 进程和线程 实时函数 RtCreateProcess RtGetExitCodeProcess RtGetThreadTimeQuantum RtIsInRtss RtTerminateProcess RtSetThreadPriority RtSetThreadTimeQuantum RtSleepFt 进程和线程 Win32-支持的函数 CreateThread ExitProcess ExitThread GetCurrentProcessId GetCurrentThread GetCurrentThreadId GetExitCodeThread GetThreadPriority RtOpenProcess ResumeThread SetThreadPriority Sleep SuspendThread TerminateThread TlsAlloc TlsFree TlsGetValue TlsSetValue