Philosophers42
I’ve never thought philosophy would be so deadly
Install / Use
/learn @anolivei/Philosophers42README
<h1 align="center"> 🍝 Philosophers </h1> <h2 align="center">I’ve never thought philosophy would be so deadly </h2> <br> <p align="center"> <img alt="Github top language" src="https://img.shields.io/github/languages/top/anolivei/Philosophers42?color=3de069"> <img alt="Github language count" src="https://img.shields.io/github/languages/count/anolivei/Philosophers42?color=3de069"> <img alt="Repository size" src="https://img.shields.io/github/repo-size/anolivei/Philosophers42?color=3de069"> <img alt="Norminette" src="https://github.com/anolivei/Philosophers42/actions/workflows/norminette.yml/badge.svg?event=push"> </p> <hr> <p align="center"> <a href="#about">About</a>   |   <a href="#links">Links</a>   |   <a href="#functions">Functions</a>   |   <a href="#starting">Starting</a>   |   <a href="https://github.com/anolivei" target="_blank">Author</a> </p> <br>
About
- Philosophers is a project at school 42 and the instructions were given in the subject.
Links
- Dining Philosophers Problem 1
- Dining Philosophers Problem 2
- Notion1 by jfreitas
- Notion2 by lfrasson
- To understand time 1
- To understand time 2
- Tester
- Script Maroto xD
- pthreads Tutorial
- Playlist about C Threads
- pthreads Short Introduction
- How to pass arguments to threads
- What are detached threads?
- An Application of Pthreads and Mutexes
- Multithreading part 1
- Multithreading part 2
- Miro by lorenuar
- Visualizer
- Figurinha by pcunha
Functions
Only the following functions are allowed to be used in this project on mandatory part:<br> | Function | Description | Function | Description | |----------|-------------|----------|-------------| | memset | fill memory with a constant byte | pthread_create | create a new thread | | printf | format and print data | pthread_detach | detach a thread | | malloc | allocate dynamic memory | pthread_join | join with a terminated thread | | free | free dynamic memory | pthread_mutex_init | initialise the mutex | | write | write to a file descriptor | pthread_mutex_destroy | destroy the mutex object | | usleep | suspend execution for microsecond intervals | pthread_mutex_lock | lock the mutex object | | gettimeofday | get the time and gives the number of seconds and microseconds since the Epoch | pthread_mutex_unlock | releases the mutex object |
Starting
# Clone this project
git clone https://github.com/anolivei/Philosophers42
# Access
cd Philosophers42/philo/
# Compile the program
make
# To understand args
./philo help
# To run (example)
./philo 10 80 80 80 2
# To remove objects
make clean
# To remove objects and executable
make fclean
<div align="center" id="top"> <img src="./.github/app.gif" alt="Gh_philosophers" /> </div>
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
