mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-27 21:40:34 +02:00
Add assertions when pushing edge buffers
This commit is contained in:
parent
15a51c8a85
commit
478b9de798
1 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,7 @@ struct gc_field_set_writer {
|
||||||
static void
|
static void
|
||||||
gc_edge_buffer_list_push(struct gc_edge_buffer_list *list,
|
gc_edge_buffer_list_push(struct gc_edge_buffer_list *list,
|
||||||
struct gc_edge_buffer *buf) {
|
struct gc_edge_buffer *buf) {
|
||||||
|
GC_ASSERT(!buf->next);
|
||||||
struct gc_edge_buffer *next =
|
struct gc_edge_buffer *next =
|
||||||
atomic_load_explicit(&list->head, memory_order_relaxed);
|
atomic_load_explicit(&list->head, memory_order_relaxed);
|
||||||
do {
|
do {
|
||||||
|
@ -72,6 +73,7 @@ static void
|
||||||
gc_edge_buffer_stack_push(struct gc_edge_buffer_stack *stack,
|
gc_edge_buffer_stack_push(struct gc_edge_buffer_stack *stack,
|
||||||
struct gc_edge_buffer *buf,
|
struct gc_edge_buffer *buf,
|
||||||
const struct gc_lock *lock) {
|
const struct gc_lock *lock) {
|
||||||
|
GC_ASSERT(!buf->next);
|
||||||
buf->next = stack->list.head;
|
buf->next = stack->list.head;
|
||||||
stack->list.head = buf;
|
stack->list.head = buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue