]> sourceware.org Git - systemtap.git/commit
Fix the edge-case of MAXTRYLOCK=0
authorJosh Stone <jistone@redhat.com>
Fri, 12 Mar 2010 01:14:59 +0000 (17:14 -0800)
committerJosh Stone <jistone@redhat.com>
Fri, 12 Mar 2010 01:15:20 +0000 (17:15 -0800)
commit0da46fcdec144f944838350f08f59a36b8709e90
tree8b825a01177517b50af0da37a1f422ac5a34e96e
parent40e400d07bcfa621eef5b4f4496b7af665089e55
Fix the edge-case of MAXTRYLOCK=0

We didn't really have good semantics for what is meant by MAXTRYLOCK=0,
so when skipped.exp tried it, we ended up locking the variable and then
reporting a skip without ever unlocking it.

This is now cleaning up the semantics such that MAXTRYLOCK defines how
many times we should loop if the lock is busy.  Thus MAXTRYLOCK=0 means
we try only once and fail immediately.

The testcase was accidentally creating contention due to the broken
unlock behavior.  We now have to try a bit harder to create real
contention, so some lengthy delays are inserted to hoard the lock.

* runtime/probe_lock.h (stp_probe_lock): Fix the skip behavior.
* testsuite/systemtap.base/skipped.exp: Add a big udelay.
runtime/probe_lock.h
testsuite/systemtap.base/skipped.exp
This page took 0.026546 seconds and 5 git commands to generate.