Author: Armin Rigo <[email protected]>
Branch: queue
Changeset: r1872:277dd2ad5226
Date: 2015-06-18 23:41 +0200
http://bitbucket.org/pypy/stmgc/changeset/277dd2ad5226/
Log: tweaks
diff --git a/c8/stm/queue.c b/c8/stm/queue.c
--- a/c8/stm/queue.c
+++ b/c8/stm/queue.c
@@ -84,8 +84,6 @@
bool ok = tree_delete_item(pseg->active_queues, (uintptr_t)queue);
assert(ok);
(void)ok;
- queue_free_entries(seg->added_in_this_transaction);
- queue_free_entries(seg->old_objects_popped);
}
else {
assert(!seg->added_in_this_transaction);
@@ -94,6 +92,9 @@
}
spinlock_release(pseg->active_queues_lock);
+
+ queue_free_entries(seg->added_in_this_transaction);
+ queue_free_entries(seg->old_objects_popped);
}
free(queue);
}
@@ -164,8 +165,11 @@
if (head != NULL) {
queue_entry_t *old;
queue_entry_t *tail = head;
- while (tail->next != NULL)
+ assert(!_is_in_nursery(head->object));
+ while (tail->next != NULL) {
tail = tail->next;
+ assert(!_is_in_nursery(tail->object));
+ }
dprintf(("items move to old_entries in queue %p\n", queue));
spinlock_acquire(queue->old_entries_lock);
@@ -271,6 +275,8 @@
queue_activate(queue, seg);
queue_check_entry(entry);
+ assert(!_is_in_nursery(entry->object));
+
entry->next = seg->old_objects_popped;
seg->old_objects_popped = entry;
return entry->object;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit