1 <assertions> 2 <assertion id="1" tag="ref:XSH6:39052:39053"> 3 sem_wait will lock the unlocked semaphore and decrement the semaphore 4 value by one. 5 </assertion> 6 <assertion id="3" tag="ref:XSH6:39056:39057"> 7 sem_wait: This test case verifies that the semaphore shall remain 8 locked until the sem_post is executed and return successfully. 9 </assertion> 10 <assertion id="4" tag="ref:XSH6:33058:39058"> 11 sem_wait hangs when it tries to lock a locked semaphore, and then killed 12 by sending a kill signal (SIGKILL). 13 </assertion> 14 <assertion id="5" tag="ref:XSH6:39066:39067"> 15 errno return EAGAIN: The semaphore can't be immediately locked by 16 sem_trywait when its already locked. 17 </assertion> 18 <assertion id="6" tag="ref:XSH6:39068:39068"> 19 errno return EINVAL: the semaphore argument doesn't not refer to a valid 20 semaphore 21 </assertion> 22 <assertion id="7" tag="ref:XSH6:39071:39071"> 23 errno return EINTR: a signal interrupted the waiting semaphore. 24 </assertion> 25 <assertion id="8" tag="ref:XSH6:39070:39070"> 26 errno return EDEADLK: sem_wait/trywait will fail if a deadlock condition is 27 detected. 28 </assertion> 29 <assertion id="9" tag="ref:XSH6:39059:39063"> 30 sem_wait/trywait return 0 on success and -1 of failure. 31 </assertion> 32 <assertion id="11" tag="ref:XSH6:39049:39050"> 33 sem_trywait shall try to lock the unlocked semaphore and decrement 34 the semaphore value by one. 35 </assertion> 36 <assertion id="12" tag="ref:XSH6:39050:39051"> 37 sem_trywait shall fail to lock a locked semaphore and try to decrement 38 the semaphore value by one. 39 </assertion> 40 <assertion id="13" tag="ref:XSH6TC2:40062:40064"> 41 If the semaphore count is 0, the call blocks until the semphore can be locked 42 or the operation is interrupted by a signal. 43 </assertion> 44 </assertions> 45