An implementation of Linux multi-threading on Raspberry Pi 3
git clone https://github.com/grassking100/linux_multithread.git
cd linux_multithread
./example
Create 10 random integer list of size 5(from 0 to 9)
Sleep and calculate summation of data[1]: 23
Sleep and calculate summation of data[7]: 24
Sleep and calculate summation of data[8]: 18
Sleep and calculate summation of data[9]: 11
Sleep and calculate summation of data[0]: 24
Sleep and calculate summation of data[3]: 23
Sleep and calculate summation of data[4]: 20
Sleep and calculate summation of data[6]: 19
Sleep and calculate summation of data[2]: 25
Sleep and calculate summation of data[5]: 25
Get result
Result[0]: 24
Result[1]: 23
Result[2]: 25
Result[3]: 23
Result[4]: 20
Result[5]: 25
Result[6]: 19
Result[7]: 24
Result[8]: 18
Result[9]: 11