Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:18PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:18 + > From: Peter Maydell > Subject: [PATCH 06/10] hw/core: Add ResetContainer which holds objects > implementing Resettable > X-Mailer: git-send-email 2.34.1 > > Imple

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-26 Thread Peter Maydell
On Tue, 20 Feb 2024 at 21:20, Peter Maydell wrote: > > On Tue, 20 Feb 2024 at 19:46, Richard Henderson > wrote: > > > > On 2/20/24 06:06, Peter Maydell wrote: > > > +void resettable_container_add(ResettableContainer *rc, Object *obj) > > > +{ > > > +g_ptr_array_add(rc->children, obj); > > >

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-21 Thread Philippe Mathieu-Daudé
On 21/2/24 17:09, Peter Maydell wrote: On Wed, 21 Feb 2024 at 15:34, Philippe Mathieu-Daudé wrote: On 20/2/24 17:06, Peter Maydell wrote: Implement a ResetContainer. This is a subclass of Object, and it implements the Resettable interface. The container holds a list of arbitrary other

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-21 Thread Peter Maydell
On Wed, 21 Feb 2024 at 15:34, Philippe Mathieu-Daudé wrote: > > On 20/2/24 17:06, Peter Maydell wrote: > > Implement a ResetContainer. This is a subclass of Object, and it > > implements the Resettable interface. The container holds a list of > > arbitrary other objects which implement

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-21 Thread Philippe Mathieu-Daudé
On 20/2/24 17:06, Peter Maydell wrote: Implement a ResetContainer. This is a subclass of Object, and it implements the Resettable interface. The container holds a list of arbitrary other objects which implement Resettable, and when the container is reset, all the objects it contains are also

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-20 Thread Peter Maydell
On Tue, 20 Feb 2024 at 19:46, Richard Henderson wrote: > > On 2/20/24 06:06, Peter Maydell wrote: > > +void resettable_container_add(ResettableContainer *rc, Object *obj) > > +{ > > +g_ptr_array_add(rc->children, obj); > > +} > > Did you want to assert here that obj does in fact implement

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-20 Thread Richard Henderson
On 2/20/24 06:06, Peter Maydell wrote: +void resettable_container_add(ResettableContainer *rc, Object *obj) +{ +g_ptr_array_add(rc->children, obj); +} Did you want to assert here that obj does in fact implement Resettable? r~

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-20 Thread Richard Henderson
On 2/20/24 06:06, Peter Maydell wrote: Implement a ResetContainer. This is a subclass of Object, and it implements the Resettable interface. The container holds a list of arbitrary other objects which implement Resettable, and when the container is reset, all the objects it contains are also

[PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-20 Thread Peter Maydell
Implement a ResetContainer. This is a subclass of Object, and it implements the Resettable interface. The container holds a list of arbitrary other objects which implement Resettable, and when the container is reset, all the objects it contains are also reset. This will allow us to have a