|
From: <sv...@va...> - 2009-06-05 16:55:55
|
Author: bart
Date: 2009-06-05 17:55:45 +0100 (Fri, 05 Jun 2009)
New Revision: 10252
Log:
Removed DRD_(vc_combine2)() because it is no longer used.
Modified:
branches/DRDDEV/drd/drd_vc.c
branches/DRDDEV/drd/drd_vc.h
Modified: branches/DRDDEV/drd/drd_vc.c
===================================================================
--- branches/DRDDEV/drd/drd_vc.c 2009-06-05 13:17:31 UTC (rev 10251)
+++ branches/DRDDEV/drd/drd_vc.c 2009-06-05 16:55:45 UTC (rev 10252)
@@ -163,24 +163,10 @@
*/
void DRD_(vc_combine)(VectorClock* const result, const VectorClock* const rhs)
{
- DRD_(vc_combine2)(result, rhs, -1);
-}
-
-/**
- * Compute elementwise maximum.
- *
- * @return True if *result and *rhs are equal, or if *result and *rhs only
- * differ in the component with thread ID tid.
- */
-Bool DRD_(vc_combine2)(VectorClock* const result,
- const VectorClock* const rhs,
- const DrdThreadId tid)
-{
unsigned i;
unsigned j;
unsigned shared;
unsigned new_size;
- Bool almost_equal = True;
tl_assert(result);
tl_assert(rhs);
@@ -214,10 +200,6 @@
/* is no corresponding clock in rhs->vc[]. */
while (i < result->size && result->vc[i].threadid < rhs->vc[j].threadid)
{
- if (result->vc[i].threadid != tid)
- {
- almost_equal = False;
- }
i++;
}
/* If the end of *result is met, append rhs->vc[j] to *result. */
@@ -225,10 +207,6 @@
{
result->size++;
result->vc[i] = rhs->vc[j];
- if (result->vc[i].threadid != tid)
- {
- almost_equal = False;
- }
}
/* If clock rhs->vc[j] is not in *result, insert it. */
else if (result->vc[i].threadid > rhs->vc[j].threadid)
@@ -240,21 +218,12 @@
}
result->size++;
result->vc[i] = rhs->vc[j];
- if (result->vc[i].threadid != tid)
- {
- almost_equal = False;
- }
}
/* Otherwise, both *result and *rhs have a clock for thread */
/* result->vc[i].threadid == rhs->vc[j].threadid. Compute the maximum. */
else
{
tl_assert(result->vc[i].threadid == rhs->vc[j].threadid);
- if (result->vc[i].threadid != tid
- && rhs->vc[j].count != result->vc[i].count)
- {
- almost_equal = False;
- }
if (rhs->vc[j].count > result->vc[i].count)
{
result->vc[i].count = rhs->vc[j].count;
@@ -263,8 +232,6 @@
}
DRD_(vc_check)(result);
tl_assert(result->size == new_size);
-
- return almost_equal;
}
/** Print the contents of vector clock 'vc'. */
Modified: branches/DRDDEV/drd/drd_vc.h
===================================================================
--- branches/DRDDEV/drd/drd_vc.h 2009-06-05 13:17:31 UTC (rev 10251)
+++ branches/DRDDEV/drd/drd_vc.h 2009-06-05 16:55:45 UTC (rev 10252)
@@ -85,9 +85,6 @@
const VectorClock* const rhs);
void DRD_(vc_combine)(VectorClock* const result,
const VectorClock* const rhs);
-Bool DRD_(vc_combine2)(VectorClock* const result,
- const VectorClock* const rhs,
- const DrdThreadId tid);
void DRD_(vc_print)(const VectorClock* const vc);
void DRD_(vc_snprint)(Char* const str, const Int size,
const VectorClock* const vc);
|