mere.cpp

来自「开发于Linux下的多线程实例,于Kdevelop下用c++开发,模拟十字路口的」· C++ 代码 · 共 65 行

CPP
65
字号
/*************************************************************************                          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 + =
减小字号Ctrl + -
显示快捷键?