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

📄 test15.h

📁 进程间调度
💻 H
字号:
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/ipc.h>#include <sys/msg.h>#include <sys/shm.h>#define SHM_KEY 5677#define MSG_KEY 5678struct PInfo{ int  pid;       /*进程的id*/ char pstatus;   /*进程的状态*/ long num;       /*对于求和进程是N,对并行计算进程是当前计算到的n值*/ long result;    /*对于求和进程是最终结果,对于并行计算进程是当前的累加值*/};struct msgbuf{ long mtype;     /*消息的类型*/ char mtext[2];  /*消息的内容*/};

⌨️ 快捷键说明

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