Skip to content

Cars (threads) arrive randomly to a semaphore and the intersection needs to be synced, my wildest city skylines dreams come true...

Notifications You must be signed in to change notification settings

urvdp/thread_sync_chaos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Overview

This project models a road intersection using threads as vehicle representations to synchronize the crossing of an east-west and north-south lane.

image

Build Instructions

To build the project, ensure you create the build directory before running make:

mkdir build
make

Project Structure

project/
├── src/                # Source files
│   ├── main.c          # Main entry point
│   ├── pantalla.c      # Module: Display logic
│   ├── cola.c          # Module: Queue logic
│   ├── vehiculo.c      # Module: Vehicle-related logic
│   └── utils.c         # Utility functions
├── include/            # Header files
│   ├── pantalla.h      # Header for pantalla.c
│   ├── cola.h          # Header for cola.c
│   ├── vehiculo.h      # Header for vehiculo.c
│   └── utils.h         # Header for utils.c
├── build/              # Compiled objects and binaries
│   ├── *.o             # Object files
│   ├── executable      # Final executable
├── logs/               # Log files (if applicable)
│   └── *.log           # Log output
├── tests/              # Test files
│   ├── test_pantalla.c # Test for pantalla module
│   └── test_utils.c    # Test for utility functions
├── CMakeLists.txt      # Build system (if using CMake)
├── Makefile            # Build system (if using Make)
└── README.md           # Project documentation

Additional Commands

github undo local commit

git reset --soft HEAD~1
  • --soft: last commit undone, keeps the changes staged for commit
  • --mixed: last commit undone, moves changes back to the working directory
  • --hard: last commit undone, all changes associated to it discarded

About

Cars (threads) arrive randomly to a semaphore and the intersection needs to be synced, my wildest city skylines dreams come true...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published