资源简介
基于IntervalZero RTX 环境下的进程间通讯 ,通过共享内存和内核对象进行数据通讯。

代码片段和文件信息
//////////////////////////////////////////////////////////////////
//
// MEMORY.c - C file
//
// This file was generated using the RTX 7.0.0 Application Wizard.
//
//////////////////////////////////////////////////////////////////
#include “memory.h“
HANDLE hEvent1;
mmdata *rp = NULL;
PVOID p=NULL;
void
_cdecl
main(
int argc
char **argv
char **envp
)
{
// for periodic timer code
LARGE_INTEGER liPeriod; // timer period
HANDLE hTimerhRTXThread; // timer handle
// for event server thread code
HANDLE hThread_high; // handle for child thread
DWORD dwSuspendCount; // suspend count
int i;
// RTX periodic timer code:
// TO DO: Set default timer period to your desired time.
// The period needs to be an even multiple of the HAL
// period found in the control panel.
// This example uses a period of 500 micro seconds.
// mmdata *rp = NULL;
// hRTXThread=RtOpenSharedMemory(SHM_MAP_WRITE|SHM_MAP_READNULL“sharemem“&p);
hRTXThread=RtOpenSharedMemory(SHM_MAP_WRITENULL“sharedmemory“&p);
if(hRTXThread==NULL)
{
printf(“error\n“);
return;
}
hEvent1 = RtCreateEvent(
NULL // security attribute
TRUE // manual reset
FALSE // initial state
“TestEvent1“ // the event name
);
hEvent=RtOpenEvent(NULLNULL“TestEvent“);
// hEvent=RtOpenSemaphore( SYNCHRONIZE FALSE “TestEvent“);
// hEvent = RtCreateEvent( NULL // security attribute
// TRUE // manual reset
// FALSE // initial state
// “TestEvent“ // the event name
// );
// Event code: create a child thread high
hThread_high = RtCreateThread(0
0
ChildThread_high
NULL
CREATE_SUSPENDED
0
);
if (hThread_high == NULL)
{
// RtWprintf(L“RtCreateThread error = %d\n“GetLastError());
// TO DO: your exception code here
// ExitProcess(1);
}
// Event code; set the priority of the child thread high
if (RtSetThreadPriority(hThread_high
HIGHPRIORITY) == FALSE)
{
// RtWprintf(L“RtSetThreadPriority error = %d\n“GetLastError());
// TO DO: your exception code here
// ExitProcess(1);
}
// Event code: resume the child thread high
dwSuspendCount = RtResumeThread(hThread_high);
if (dwSuspendCount == 0xFFFFFFFF)
{
// RtWprintf(L“RtResum
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4054 2007-12-06 14:48 memory\memory.c
文件 8357 2007-03-26 16:10 memory\memory.dsp
文件 728 2007-03-26 16:16 memory\memory.dsw
文件 918 2007-07-26 15:29 memory\memory.h
文件 66560 2008-01-17 19:20 memory\memory.ncb
文件 58880 2008-01-17 19:20 memory\memory.opt
文件 1144 2009-09-17 17:39 memory\memory.plg
文件 491 2007-03-26 16:44 memory\memoryFuncs.c
文件 40960 2008-12-18 11:05 show\Memory.rtss
文件 3543 2007-03-26 16:04 show\ReadMe.txt
文件 1078 2007-03-26 16:04 show\res\show.ico
文件 396 2007-03-26 16:04 show\res\show.rc2
文件 636 2007-07-26 15:29 show\resource.h
文件 34896 2007-07-26 15:29 show\show.aps
文件 846 2009-09-17 17:40 show\show.clw
文件 1829 2007-03-26 16:04 show\show.cpp
文件 4165 2007-03-26 16:08 show\show.dsp
文件 730 2007-03-27 09:13 show\show.dsw
文件 1302 2007-03-26 16:04 show\show.h
文件 74752 2009-09-17 17:40 show\show.ncb
文件 62976 2009-09-17 17:40 show\show.opt
文件 1087 2008-12-18 11:06 show\show.plg
文件 4664 2007-07-26 15:29 show\show.rc
文件 5492 2008-12-18 11:05 show\showDlg.cpp
文件 1376 2007-07-26 15:38 show\showDlg.h
文件 206 2007-03-26 16:04 show\StdAfx.cpp
文件 999 2007-03-26 16:04 show\StdAfx.h
目录 0 2007-03-26 16:04 show\res
目录 0 2009-09-17 17:40 memory
目录 0 2009-09-17 17:40 show
............此处省略3个文件信息
相关资源
- pscad近海风电模型 Fortran语言
- DV泵加罗茨泵独立控制系统PID.smart
- CVSNT 完整覆盖版防TortoiseCVS中文乱码
- 200smart单按钮启停.smart
- 弹塑性力学Fortran算例
- Rtx51_tiny_RTOS中文版.pdf
- Micrium.RTOS.1.0.0.pack
- Quartus II 15.0中仿真Altera三速以太网I
- Quartus II 15.0中仿真Altera三速以太网I
- porting.RTEMS移植指南.双语.V20131224.pdf
- VirTest5.0.rar
- CAD中插入带坐标的正射影像——Inse
- Uninstall_Cortana_WINCLIENT.CN.rar
- 3人表决器 QuartusII
- Verilog FPGA UART串口控制器
- STM32基于rt_thread操作系统的SDHC卡文件
- 通风网络解算程序 fortran90
- vc 柱形图 CBarChart
- zen_cart_1.3.9h_ 配置文件优化
- Google Earth KML文件生成工具
- google earth 高程点坐标提取软件
- 分治法快速排序算法QuickSort C
- ReportMachine 交叉报表 学生成绩表
- 硬件课程设计—流水灯(quartus软件
- UART转CAN或LIN的工具(Uart2any)和文档
- 曼彻斯特编解码_同步QuartusII工程
- WinForm属性编辑 propertyGrid示例 仿wind
- virtuoso实例教学
- 基于DSP2812的以太网调试程序
- 软件方法测试RTX时钟
评论
共有 条评论