Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 947 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 947 Bytes

Threads in C

Experimenting with the library pthreads, an API available for POSIX (in my case, Linux) ecosystems.

The program consists in having a race condition with a global value such as a bank account balance and making usage of a Mutex to solve it, locking the value and making it consistent throughout all threads.

Running

Requirements:

  • GCC compiler;
  • POSIX API-compliant OS;
gcc -o program src/main.c src/bank_account/bank_account.c 

## program is essentially just the name of the executable and can be changed to whatever

References: