Lines Matching defs:rhs

73 void DRD_(vc_copy)(VectorClock* const new, const VectorClock* const rhs)
75 DRD_(vc_init)(new, rhs->vc, rhs->size);
79 void DRD_(vc_assign)(VectorClock* const lhs, const VectorClock* const rhs)
82 DRD_(vc_copy)(lhs, rhs);
125 void DRD_(vc_min)(VectorClock* const result, const VectorClock* const rhs)
131 tl_assert(rhs);
137 for (j = 0; j < rhs->size; j++)
139 while (i < result->size && result->vc[i].threadid < rhs->vc[j].threadid)
149 if (result->vc[i].threadid <= rhs->vc[j].threadid)
153 tl_assert(result->vc[i].threadid == rhs->vc[j].threadid);
154 if (rhs->vc[j].count < result->vc[i].count)
156 result->vc[i].count = rhs->vc[j].count;
166 void DRD_(vc_combine)(VectorClock* const result, const VectorClock* const rhs)
174 tl_assert(rhs);
181 while (j < rhs->size && rhs->vc[j].threadid < result->vc[i].threadid)
183 if (j >= rhs->size)
185 if (result->vc[i].threadid == rhs->vc[j].threadid)
191 new_size = result->size + rhs->size - shared;
199 for (j = 0; j < rhs->size; j++)
202 /* is no corresponding clock in rhs->vc[]. */
203 while (i < result->size && result->vc[i].threadid < rhs->vc[j].threadid)
207 /* If the end of *result is met, append rhs->vc[j] to *result. */
211 result->vc[i] = rhs->vc[j];
213 /* If clock rhs->vc[j] is not in *result, insert it. */
214 else if (result->vc[i].threadid > rhs->vc[j].threadid)
222 result->vc[i] = rhs->vc[j];
224 /* Otherwise, both *result and *rhs have a clock for thread */
225 /* result->vc[i].threadid == rhs->vc[j].threadid. Compute the maximum. */
228 tl_assert(result->vc[i].threadid == rhs->vc[j].threadid);
229 if (rhs->vc[j].count > result->vc[i].count)
231 result->vc[i].count = rhs->vc[j].count;