Renamed a variable and removed two statements that were commented out.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8880 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd_semaphore.c b/drd/drd_semaphore.c
index 6dd6008..1637cfe 100644
--- a/drd/drd_semaphore.c
+++ b/drd/drd_semaphore.c
@@ -94,7 +94,7 @@
tl_assert(p->type == ClientSemaphore);
p->cleanup = (void(*)(DrdClientobj*))semaphore_cleanup;
- p->initial_value = 0;
+ p->waits_to_skip = 0;
p->value = 0;
p->waiters = 0;
p->last_sem_post_tid = DRD_INVALID_THREADID;
@@ -151,10 +151,8 @@
struct semaphore_info* semaphore_init(const Addr semaphore,
const Word pshared, const UInt value)
{
- /* unsigned n; */
struct semaphore_info* p;
Segment* sg;
- /* const DrdThreadId drd_tid = thread_get_running_tid(); */
if (s_trace_semaphore)
{
@@ -186,7 +184,7 @@
p = semaphore_get_or_allocate(semaphore);
}
tl_assert(p);
- p->initial_value = value;
+ p->waits_to_skip = value;
p->value = value;
return p;
}
@@ -272,8 +270,8 @@
}
p->value--;
tl_assert((int)p->value >= 0);
- if (p->initial_value > 0)
- p->initial_value--;
+ if (p->waits_to_skip > 0)
+ p->waits_to_skip--;
else
{
sg = segment_pop(p);