Change 16315 by sky@sky-lab on 2002/05/01 19:15:46
Now passes old test case.
Affected files ...
.... //depot/perl/ext/threads/shared/semaphore.pm#2 edit
Differences ...
==== //depot/perl/ext/threads/shared/semaphore.pm#2 (text) ====
Index: perl/ext/threads/shared/semaphore.pm
--- perl/ext/threads/shared/semaphore.pm.~1~ Wed May 1 13:30:06 2002
+++ perl/ext/threads/shared/semaphore.pm Wed May 1 13:30:06 2002
@@ -74,17 +74,17 @@
sub down {
my $s = shift;
- lock($s);
+ lock($$s);
my $inc = @_ ? shift : 1;
- cond_wait $s until $$s >= $inc;
+ cond_wait $$s until $$s >= $inc;
$$s -= $inc;
}
sub up {
my $s = shift;
- lock($s);
+ lock($$s);
my $inc = @_ ? shift : 1;
- ($$s += $inc) > 0 and cond_broadcast $s;
+ ($$s += $inc) > 0 and cond_broadcast $$s;
}
1;
End of Patch.