[c] How to return a value from pthread threads in C?