summaryrefslogtreecommitdiff
path: root/ACE/netsvcs/clients/Tokens/rw_lock/README
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 14:51:23 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 14:51:23 +0000
commit99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch)
treebda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/netsvcs/clients/Tokens/rw_lock/README
parentc4078c377d74290ebe4e66da0b4975da91732376 (diff)
downloadATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz
undoing accidental deletion
Diffstat (limited to 'ACE/netsvcs/clients/Tokens/rw_lock/README')
-rw-r--r--ACE/netsvcs/clients/Tokens/rw_lock/README40
1 files changed, 40 insertions, 0 deletions
diff --git a/ACE/netsvcs/clients/Tokens/rw_lock/README b/ACE/netsvcs/clients/Tokens/rw_lock/README
new file mode 100644
index 00000000000..dabc0a3741d
--- /dev/null
+++ b/ACE/netsvcs/clients/Tokens/rw_lock/README
@@ -0,0 +1,40 @@
+
+test_rw_locks shows how to use ACE_Local_RLock, ACE_Local_WLock,
+ACE_Remote_RLock, and ACE_Remote_WLock.
+
+Here are the options to test_rw_locks:
+% ./test_rw_lock -u
+ -i ignore deadlock
+ -n <iterations>
+ -r <reads>
+ -d debug
+ -s sleep during writes
+ -t <threads>
+
+test_rw_locks spawns <threads> number of threads which perform the
+following algorithm:
+
+for <iterations>
+ {
+ for <reads>
+ acquire read lock
+ for <reads>
+ release read lock
+
+ acquire write lock
+ if (sleep during writes)
+ sleep for 1 second
+ release write lock
+ }
+
+
+The output should show that multiple readers can acquire the lock for
+reading simultaneously (note that this also tests recursive
+acquisition.) When a writer lock is acquired, the output should show
+that no thread holds a reader lock.
+
+To run a test, simply type:
+% ./test_rw_lock
+
+This should show output as described above.
+