anolivei / Philosophers42

I’ve never thought philosophy would be so deadly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

 

🍝 Philosophers

I’ve never thought philosophy would be so deadly


Github top language Github language count Repository size Norminette


About   |   Links   |   Functions   |   Starting   |   Author


About

  • Philosophers is a project at school 42 and the instructions were given in the subject.

Links

Functions

Only the following functions are allowed to be used in this project on mandatory part:

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

 

Gh_philosophers

About

I’ve never thought philosophy would be so deadly


Languages

Language:C 91.7%Language:Makefile 8.3%