• Home
  • Raw
  • Download

Lines Matching refs:sg

48 static void thread_append_segment(const DrdThreadId tid, Segment* const sg);
49 static void thread_discard_segment(const DrdThreadId tid, Segment* const sg);
517 Segment* sg; in DRD_() local
523 for (sg = DRD_(g_threadinfo)[tid].sg_last; sg; sg = sg_prev) { in DRD_()
524 sg_prev = sg->thr_prev; in DRD_()
525 sg->thr_next = NULL; in DRD_()
526 sg->thr_prev = NULL; in DRD_()
527 DRD_(sg_put)(sg); in DRD_()
822 void thread_append_segment(const DrdThreadId tid, Segment* const sg) in thread_append_segment() argument
832 sg->thr_prev = DRD_(g_threadinfo)[tid].sg_last; in thread_append_segment()
833 sg->thr_next = NULL; in thread_append_segment()
835 DRD_(g_threadinfo)[tid].sg_last->thr_next = sg; in thread_append_segment()
836 DRD_(g_threadinfo)[tid].sg_last = sg; in thread_append_segment()
838 DRD_(g_threadinfo)[tid].sg_first = sg; in thread_append_segment()
850 void thread_discard_segment(const DrdThreadId tid, Segment* const sg) in thread_discard_segment() argument
859 if (sg->thr_prev) in thread_discard_segment()
860 sg->thr_prev->thr_next = sg->thr_next; in thread_discard_segment()
861 if (sg->thr_next) in thread_discard_segment()
862 sg->thr_next->thr_prev = sg->thr_prev; in thread_discard_segment()
863 if (sg == DRD_(g_threadinfo)[tid].sg_first) in thread_discard_segment()
864 DRD_(g_threadinfo)[tid].sg_first = sg->thr_next; in thread_discard_segment()
865 if (sg == DRD_(g_threadinfo)[tid].sg_last) in thread_discard_segment()
866 DRD_(g_threadinfo)[tid].sg_last = sg->thr_prev; in thread_discard_segment()
867 DRD_(sg_put)(sg); in thread_discard_segment()
892 void DRD_(thread_get_latest_segment)(Segment** sg, const DrdThreadId tid) in DRD_()
896 tl_assert(sg); in DRD_()
902 DRD_(sg_put)(*sg); in DRD_()
903 *sg = DRD_(sg_get)(latest_sg); in DRD_()
989 Segment* sg; in thread_discard_ordered_segments() local
992 for (sg = DRD_(g_threadinfo)[i].sg_first; in thread_discard_ordered_segments()
993 sg && (sg_next = sg->thr_next) in thread_discard_ordered_segments()
994 && DRD_(vc_lte)(&sg->vc, &thread_vc_min); in thread_discard_ordered_segments()
995 sg = sg_next) in thread_discard_ordered_segments()
997 thread_discard_segment(i, sg); in thread_discard_ordered_segments()
1045 Segment* sg; in thread_consistent_segment_ordering() local
1047 for (sg = DRD_(g_threadinfo)[i].sg_first; sg; sg = sg->thr_next) { in thread_consistent_segment_ordering()
1048 if (!sg->thr_next || DRD_(sg_get_refcnt)(sg) > 1) { in thread_consistent_segment_ordering()
1049 if (DRD_(vc_lte)(&sg2->vc, &sg->vc)) in thread_consistent_segment_ordering()
1051 if (DRD_(vc_lte)(&sg1->vc, &sg->vc)) in thread_consistent_segment_ordering()
1055 for (sg = DRD_(g_threadinfo)[i].sg_last; sg; sg = sg->thr_prev) { in thread_consistent_segment_ordering()
1056 if (!sg->thr_next || DRD_(sg_get_refcnt)(sg) > 1) { in thread_consistent_segment_ordering()
1057 if (DRD_(vc_lte)(&sg->vc, &sg1->vc)) in thread_consistent_segment_ordering()
1059 if (DRD_(vc_lte)(&sg->vc, &sg2->vc)) in thread_consistent_segment_ordering()
1094 Segment* sg; in thread_merge_segments() local
1100 for (sg = DRD_(g_threadinfo)[i].sg_first; sg; sg = sg->thr_next) { in thread_merge_segments()
1101 if (DRD_(sg_get_refcnt)(sg) == 1 && sg->thr_next) { in thread_merge_segments()
1102 Segment* const sg_next = sg->thr_next; in thread_merge_segments()
1105 && thread_consistent_segment_ordering(i, sg, sg_next)) in thread_merge_segments()
1108 DRD_(sg_merge)(sg, sg_next); in thread_merge_segments()
1204 static void thread_combine_vc_sync(DrdThreadId tid, const Segment* sg) in thread_combine_vc_sync() argument
1206 const VectorClock* const vc = &sg->vc; in thread_combine_vc_sync()
1212 tl_assert(sg); in thread_combine_vc_sync()
1215 if (tid != sg->tid) { in thread_combine_vc_sync()
1246 void DRD_(thread_new_segment_and_combine_vc)(DrdThreadId tid, const Segment* sg) in DRD_()
1251 tl_assert(sg); in DRD_()
1255 thread_combine_vc_sync(tid, sg); in DRD_()