[PATCH v9 1/1] Extend struct r_debug to support multiple namespaces [BZ #15971]

Florian Weimer fweimer@redhat.com
Mon Sep 13 14:40:09 GMT 2021


* H. J. Lu:

> +	  /* Add the new namespace to the linked list.  After a namespace
> +	     is initialized, r_brk becomes non-zero.  A namespace becomes
> +	     empty (r_map == NULL) when it is unused.  But it is never
> +	     removed from the linked list.  */
> +	  r->r_next = _r_debug_extended.r_next;
> +	  atomic_store_release (&_r_debug_extended.r_next, r);

I think the addition should be at the end of the list, and the list
update (with release MO) should come last.  That should help with
reading the list concurrently.

Rest looks okay to me.

Thanks,
Florian



More information about the Gdb mailing list