FIFO semaphore test

Posted by L4N0 on Stack Overflow See other posts from Stack Overflow or by L4N0
Published on 2009-10-21T04:39:09Z Indexed on 2010/06/12 12:02 UTC
Read the original article Hit count: 450

Filed under:
|
|

Hello everyone, I have implemented FIFO semaphores but now I need a way to test/prove that they are working properly. A simple test would be to create some threads that try to wait on a semaphore and then print a message with a number and if the numbers are in order it should be FIFO, but this is not good enough to prove it because that order could have occurred by chance. Thus, I need a better way of testing it.
If necessary locks or condition variables can be used too.
Thanks

© Stack Overflow or respective owner

Related posts about test

Related posts about semaphore