lib/tst_res.c: synchronize access to tst_res functions

The patch adds locking to tst_res.c functions that use global variables
e.g. T_exitval, tst_count, T_out, ...

Note: The mutexes will only do the locking if the test is linked with
      pthread library, otherwise no-op stubs (defined in libc) are used.
      Also some functions calls each other that is why recursive mutex is
      used.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
1 file changed