This is a project created to utilize POSIX threads in C by simulating a pizzeria.
The program receives and handles multiple pizza orders by taking them through various stages, from the order submission and asynchronous electronic payment, until the delivery of the pizza to the customer's home.
- pizzeria.c contains the C code
- pizzeria.h contains various constants definitions that can be altered to change the behavior of some aspects of the restaurant simulation
- test-res.sh is a script that compiles and runs the program for 10 orders, seeding it with the number 1000
- Be sure to have a recent
gcc
version on your machine, if not:- (For Windows users) Here is a tutorial
- (For Linux users) Run
sudo apt-get install gcc
in your terminal - (For Mac users) Run
brew install gcc
in your terminal (requires homebrew)
- In a terminal that is in the project directory, run the script with
./test-res.sh
. - Play with and change the constants on pizzeria.h to your liking for different behavior. You can also change the arguments passed to the program via
test-res.sh
(first argument is order number, second is seed for pseudorandom number generation).
Made with ❤️ by Alex Papadopoulos and Katerina Mantaraki for 🎓