This program is an simple example for the usage of pthreads. This example consists of the performing various operations like sum, multiplication, prime numbers etc. using threads. This is like a simple operating system, where commands are defined programatically.
- gcc index.c -pthread -o index -std=c99
- ./index
- sum(x1, x2,..., x6)
- sub(x1, x2) or sub(x1, x2, ..., x6)
- mul(x1, x2,..., x6)
- div(x1, x2)
- sprime(x1, x2,..., x6)
- bprime(x1, x2,..., x6)
- lcm(x1, x2,..., x6)
- gcd(x1, x2,..., x6)
- ls