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

📄 voie.cpp

📁 开发于Linux下的多线程实例,于Kdevelop下用c++开发,模拟十字路口的车辆与交通灯.
💻 CPP
字号:
/*************************************************************************                          Voie.cpp  -  description                             -------------------    d閎ut                : mer mar 3 2004    copyright            : (C) 2004 par Xin ZHOU & Robin WETZEL    e-mail               : rwetzel@mail.insa-lyon.fr*************************************************************************///---------- R閍lisation de la t鈉he <Voie> (fichier Voie.cpp) -------------////////////////////////////////////////////////////////////////// INCLUDE//-------------------------------------------------------- Include syst鑝e#include <signal.h>#include <stdlib.h>#include <unistd.h>#include <sys/wait.h>#include <sys/msg.h>#include <sys/shm.h>#include <sys/sem.h>//------------------------------------------------------ Include personnel#include "Voie.h"#include "/public/tp/tp-multitache/Voiture.h"#include "/public/tp/tp-multitache/Outils.h"//////////////////////////////////////////////////////////////////// PRIVE//------------------------------------------------------------- Constantes//------------------------------------------------------------------ Typestypedef struct{  bool voie1_3Libre;  bool voie2_4Libre;}FormatEtatFeux;//------------------------------------------------------ Variables priv閑s// Identifiant de la file de messages (file de Vehicules)static int idFile;// Handlersstatic struct sigaction destrHnd;static struct sigaction detectionHnd;// Pointeur sur la ZMP etatFeuxstatic FormatEtatFeux * zoneFeux;//------------------------------------------------------ Fonctions priv閑sstatic void HandlerDestruction ( int noSignal )// Mode d'emploi :// Handler associ

⌨️ 快捷键说明

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