1 #include "tls_test_frame.h"
2 
3 /* Wait the system call return success regardless of signals that do not cause test process to terminate. */
tls_test_semaphore_wait(TLS_TEST_SEMAPHORE * semaphore_ptr)4 INT tls_test_semaphore_wait( TLS_TEST_SEMAPHORE* semaphore_ptr)
5 {
6     INT ret;
7 
8     /* Wait for the semaphore ignoring signals. */
9     while ( -1 == ( ret = sem_wait( semaphore_ptr)) && ( errno == EINTR));
10 
11     /* Check for return value of the system call. */
12     return_value_if_fail( -1 != ret, TLS_TEST_SYSTEM_CALL_FAILED);
13     return TLS_TEST_SUCCESS;
14 }
15