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

📄 mere.cpp

📁 开发于Linux下的多线程实例,于Kdevelop下用c++开发,模拟十字路口的车辆与交通灯.
💻 CPP
字号:
/*************************************************************************                          Mere.cpp  -  description                             -------------------    d閎ut                : mer mar  3 15:04:20 CET 2004    copyright            : (C) 2004 par Xin ZHOU & Robin WETZEL    e-mail               : rwetzel@mail.insa-lyon.fr*************************************************************************///---------- R閍lisation de la t鈉he m鑢e (fichier Mere.cpp) -------------////////////////////////////////////////////////////////////////// INCLUDE//-------------------------------------------------------- Include syst鑝e#include <config.h>#include <unistd.h>#include <sys/wait.h>#include <sys/types.h>#include <sys/msg.h>#include <sys/ipc.h>#include <sys/shm.h>#include <sys/sem.h>//------------------------------------------------------ Include personnel#include "/public/tp/tp-multitache/Outils.h"#include "/public/tp/tp-multitache/Heure.h"#include "/public/tp/tp-multitache/Generateur.h"#include "Clavier.h"#include "Voie.h"#include "Feux.h"#include "Mere.h"//////////////////////////////////////////////////////////////////// PRIVE//------------------------------------------------------------- Constantes#define DROITS 0660 // Droits d'acc鑣 aux ressources syst鑝e cr殚es//------------------------------------------------------------------ Types//------------------------------------------------------ Variables priv閑s//------------------------------------------------------ Fonctions priv閑s/////////////////////////////////////////////////////////////////// PUBLIC//---------------------------------------------------- Fonctions publiquesint main( ){  pid_t noClavier;  pid_t noHeure;  pid_t noFeux;  pid_t noVoie1;  pid_t noVoie2;  pid_t noVoie3;  pid_t noVoie4;  pid_t noGenerateur;  int idFile;  int semEtatFeux;  int etatFeux;  FormatetatFeux * zoneFeux;  // Cr閍tion et initilaisation des ressources li閑s 

⌨️ 快捷键说明

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