|
From: <sv...@va...> - 2009-05-23 18:40:46
|
Author: bart
Date: 2009-05-23 19:40:39 +0100 (Sat, 23 May 2009)
New Revision: 10123
Log:
Renamed two functions.
Modified:
branches/DRDDEV/drd/drd_barrier.c
branches/DRDDEV/drd/drd_mutex.c
branches/DRDDEV/drd/drd_rwlock.c
branches/DRDDEV/drd/drd_semaphore.c
branches/DRDDEV/drd/drd_thread.c
branches/DRDDEV/drd/drd_thread.h
Modified: branches/DRDDEV/drd/drd_barrier.c
===================================================================
--- branches/DRDDEV/drd/drd_barrier.c 2009-05-23 17:48:54 UTC (rev 10122)
+++ branches/DRDDEV/drd/drd_barrier.c 2009-05-23 18:40:39 UTC (rev 10123)
@@ -466,7 +466,7 @@
if (r != q)
{
tl_assert(r->sg[p->post_iteration]);
- DRD_(thread_combine_vc2)(tid, r->sg[p->post_iteration]);
+ DRD_(thread_combine_vc_sync)(tid, r->sg[p->post_iteration]);
}
}
Modified: branches/DRDDEV/drd/drd_mutex.c
===================================================================
--- branches/DRDDEV/drd/drd_mutex.c 2009-05-23 17:48:54 UTC (rev 10122)
+++ branches/DRDDEV/drd/drd_mutex.c 2009-05-23 18:40:39 UTC (rev 10123)
@@ -308,7 +308,7 @@
if (last_owner != drd_tid && last_owner != DRD_INVALID_THREADID)
{
tl_assert(p->last_locked_segment);
- DRD_(thread_combine_vc2)(drd_tid, p->last_locked_segment);
+ DRD_(thread_combine_vc_sync)(drd_tid, p->last_locked_segment);
}
DRD_(thread_new_segment)(drd_tid);
s_mutex_segment_creation_count++;
Modified: branches/DRDDEV/drd/drd_rwlock.c
===================================================================
--- branches/DRDDEV/drd/drd_rwlock.c 2009-05-23 17:48:54 UTC (rev 10122)
+++ branches/DRDDEV/drd/drd_rwlock.c 2009-05-23 18:40:39 UTC (rev 10123)
@@ -174,7 +174,7 @@
{
if (q->tid != tid && (readers_too || q->last_lock_was_writer_lock))
{
- DRD_(thread_combine_vc2)(tid, q->last_unlock_segment);
+ DRD_(thread_combine_vc_sync)(tid, q->last_unlock_segment);
}
}
}
Modified: branches/DRDDEV/drd/drd_semaphore.c
===================================================================
--- branches/DRDDEV/drd/drd_semaphore.c 2009-05-23 17:48:54 UTC (rev 10122)
+++ branches/DRDDEV/drd/drd_semaphore.c 2009-05-23 18:40:39 UTC (rev 10123)
@@ -302,7 +302,7 @@
if (p->last_sem_post_tid != tid
&& p->last_sem_post_tid != DRD_INVALID_THREADID)
{
- DRD_(thread_combine_vc2)(tid, sg);
+ DRD_(thread_combine_vc_sync)(tid, sg);
}
DRD_(sg_put)(sg);
DRD_(thread_new_segment)(tid);
Modified: branches/DRDDEV/drd/drd_thread.c
===================================================================
--- branches/DRDDEV/drd/drd_thread.c 2009-05-23 17:48:54 UTC (rev 10122)
+++ branches/DRDDEV/drd/drd_thread.c 2009-05-23 18:40:39 UTC (rev 10123)
@@ -306,7 +306,7 @@
tl_assert(DRD_(IsValidDrdThreadId)(drd_joiner));
tl_assert(DRD_(IsValidDrdThreadId)(drd_joinee));
DRD_(thread_new_segment)(drd_joinee);
- DRD_(thread_combine_vc)(drd_joiner, drd_joinee);
+ DRD_(thread_combine_vc_join)(drd_joiner, drd_joinee);
DRD_(thread_new_segment)(drd_joiner);
if (s_trace_fork_join)
@@ -969,7 +969,7 @@
}
/** Call this function after thread 'joiner' joined thread 'joinee'. */
-void DRD_(thread_combine_vc)(DrdThreadId joiner, DrdThreadId joinee)
+void DRD_(thread_combine_vc_join)(DrdThreadId joiner, DrdThreadId joinee)
{
tl_assert(joiner != joinee);
tl_assert(0 <= (int)joiner && joiner < DRD_N_THREADS
@@ -989,10 +989,12 @@
}
/**
- * Call this function after thread 'tid' had to wait because of thread
- * synchronization until the memory accesses in the segment 'sg' finished.
+ * Update the vector clock of the last segment of thread tid with the
+ * the vector clock of segment sg. Call this function after thread tid had
+ * to wait because of thread synchronization until the memory accesses in the
+ * segment sg finished.
*/
-void DRD_(thread_combine_vc2)(DrdThreadId tid, const Segment* sg)
+void DRD_(thread_combine_vc_sync)(DrdThreadId tid, const Segment* sg)
{
const VectorClock* const vc = &sg->vc;
@@ -1005,6 +1007,7 @@
if (tid != sg->tid)
{
VectorClock old_vc;
+
DRD_(vc_copy)(&old_vc, &DRD_(g_threadinfo)[tid].last->vc);
DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc, vc);
if (conflict_set_update_needed(tid, &old_vc,
Modified: branches/DRDDEV/drd/drd_thread.h
===================================================================
--- branches/DRDDEV/drd/drd_thread.h 2009-05-23 17:48:54 UTC (rev 10122)
+++ branches/DRDDEV/drd/drd_thread.h 2009-05-23 18:40:39 UTC (rev 10123)
@@ -147,9 +147,9 @@
void DRD_(thread_new_segment)(const DrdThreadId tid);
VectorClock* DRD_(thread_get_vc)(const DrdThreadId tid);
void DRD_(thread_get_latest_segment)(Segment** sg, const DrdThreadId tid);
-void DRD_(thread_combine_vc)(const DrdThreadId joiner,
- const DrdThreadId joinee);
-void DRD_(thread_combine_vc2)(const DrdThreadId tid, const Segment* sg);
+void DRD_(thread_combine_vc_join)(const DrdThreadId joiner,
+ const DrdThreadId joinee);
+void DRD_(thread_combine_vc_sync)(const DrdThreadId tid, const Segment* sg);
void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2);
void DRD_(thread_start_recording)(const DrdThreadId tid);
|