summaryrefslogtreecommitdiff
path: root/ACE/netsvcs/clients/Tokens/invariant/README
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/netsvcs/clients/Tokens/invariant/README')
-rw-r--r--ACE/netsvcs/clients/Tokens/invariant/README28
1 files changed, 28 insertions, 0 deletions
diff --git a/ACE/netsvcs/clients/Tokens/invariant/README b/ACE/netsvcs/clients/Tokens/invariant/README
new file mode 100644
index 00000000000..3c596cb2f3b
--- /dev/null
+++ b/ACE/netsvcs/clients/Tokens/invariant/README
@@ -0,0 +1,28 @@
+$Id$
+
+invariants.cpp tests the ACE Token Invariant utilities. The ACE Token
+Invariant utilities allow an application to test the correctness of
+mutex and readers/writer locks.
+
+invariants.cpp takes no command-line arguments. invariants.cpp first
+tests readers/writer locks. This is done by spawning two threads
+which simulate reader and writer acquire/renew/release loops.
+However, the loops are performed without actual locks, so the
+competing threads quickly reach and invalid state. The test should
+report this violation of readers/writer lock invariants and both
+threads should exit.
+
+The second test is for mutexes. Similar to the readers/writer lock
+test, this test spawns two threads which perform acquire/renew/release
+loops. When to two threads reach an invalid mutex state, the error
+should be reported and the threads should exit.
+
+For these two previous tests, it is theoretically possible that the
+threads never reach an invalid token state. However, it is highly
+unlikely since the threads would have to execute the same code
+simultaneously for the duration of the test. Nevertheless, it is
+possible.
+
+The last test hardwires invalid token states. It runs two mutex and
+two readers/writer lock tests. It should report "succeeded" for the
+four tests.