📄 proc2.cc
字号:
typedef unsigned long dword;
#include "stdio.h"
#include "SystemCallLib.h"
dword nSemaphoreID;
void main()
{
while(OpenSemaphore(&nSemaphoreID, "Semaphore1")!=0);
//printf("proc2 main thread semaphore ID = %d\n", nSemaphoreID);
while(1)
{
WaitSemaphore(nSemaphoreID, true);
SerialPutchar('m');
SerialPutchar('a');
SerialPutchar('i');
SerialPutchar('n');
SerialPutchar('2');
SerialPutchar('\n');
SignalSemaphore(nSemaphoreID);
for(int i=0;i<0x300000;i++);
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -