Author: Remi Meier <remi.me...@inf.ethz.ch> Branch: use-gcc Changeset: r1902:6666c6fd1aad Date: 2015-07-29 15:00 +0200 http://bitbucket.org/pypy/stmgc/changeset/6666c6fd1aad/
Log: add missing acquire_modification_lock_wr diff --git a/c8/stm/core.c b/c8/stm/core.c --- a/c8/stm/core.c +++ b/c8/stm/core.c @@ -119,6 +119,7 @@ dprintf(("copy_bk_objs_in_page_from(%d, %ld, %d)\n", from_segnum, (long)pagenum, only_if_not_modified)); + assert(modification_lock_check_rdlock(from_segnum)); struct list_s *list = get_priv_segment(from_segnum)->modified_old_objects; struct stm_undo_s *undo = (struct stm_undo_s *)list->items; struct stm_undo_s *end = (struct stm_undo_s *)(list->items + list->count); diff --git a/c8/stm/hashtable.c b/c8/stm/hashtable.c --- a/c8/stm/hashtable.c +++ b/c8/stm/hashtable.c @@ -379,11 +379,13 @@ will make the other transaction check that it didn't do any stm_hashtable_list() on the complete hashtable. */ + acquire_modification_lock_wr(STM_SEGMENT->segment_num); STM_PSEGMENT->modified_old_objects = list_append3( STM_PSEGMENT->modified_old_objects, TYPE_POSITION_MARKER, /* type1 */ TYPE_MODIFIED_HASHTABLE, /* type2 */ (uintptr_t)hobj); /* modif_hashtable */ + release_modification_lock_wr(STM_SEGMENT->segment_num); } } entry->object = nvalue; diff --git a/c8/stm/marker.c b/c8/stm/marker.c --- a/c8/stm/marker.c +++ b/c8/stm/marker.c @@ -73,12 +73,14 @@ /* -2 is not odd */ assert(marker.odd_number != (uintptr_t)TYPE_MODIFIED_HASHTABLE); + acquire_modification_lock_wr(STM_SEGMENT->segment_num); STM_PSEGMENT->position_markers_last = list_count(list); STM_PSEGMENT->modified_old_objects = list_append3( list, TYPE_POSITION_MARKER, /* type */ marker.odd_number, /* marker_odd_number */ (uintptr_t)marker.object); /* marker_object */ + release_modification_lock_wr(STM_SEGMENT->segment_num); } static void timing_write_read_contention(struct stm_undo_s *start, _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit