⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signal.h

📁 一个信号量传递的例子
💻 H
字号:
#include "vxWorks.h"
#include "stdio.h"
#include "stdlib.h"
#include "semLib.h"
#include "taskLib.h"

#define  NUM_SAMPLE  10
#define  DELAY_TICKS 8
#define  STACK_SIZE  20000

typedef struct _LIST_NODE
{
    int                data;
    struct _LIST_NODE  *pNextNode;  

}LIST_NODE;

int  tidCosmos;
int  tidSchlep;
int  tidCrunch;
int  tidMonitor;
int  cosmicData = 0;
int  result     = 0;
LIST_NODE  *pCurrNode = NULL;
SEM_ID  dataSemId;
SEM_ID  syncSemId;
SEM_ID  nodeListGuardSemId;


void cosmos(void);
void nodeAdd(int data);
void schlep(void);
void nodeScrap(void);
void crunch(void);
void monitor(void);
void progStop(void);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -