On Thu, Nov 14, 2024 at 02:54:38PM +0100, Gerd Hoffmann wrote:
> On Wed, Nov 13, 2024 at 11:14:28AM +0000, Daniel Khodabakhsh wrote:
> > Hi Gerd,
> > 
> > Thanks for the reviews!
> > 
> > >
> > > seabios has a linked list implementation (see src/list.h).
> > > Please use that instead of rolling your own.
> > >
> > > Otherwise the patch looks sane on a quick glance.
> > >
> > 
> > Thanks for this suggestion as well. I tried it out but I'm having
> > trouble getting it to work. My SeaBIOS hangs after the splash screen.
> > I believe it's due to how the hlist_for_each_entry macro retrieves the
> > node container via the inner macro call to container_of. Since the
> > containers are in FSEG (so they can be used during runtime) I believe
> > they need to be retrieved with GET_GLOBAL (like I do in the previous
> > patches' for loops). I attached the hlist version as
> > 0001-Use-hlists-to-track-USB-HID-devices.patch
> > 
> > Is it necessary to use hlist? Linked lists are simple enough and I'm
> > not using the double-linked list nature of hlist.
> 
> Given that there isn't much list management to do here (the patch never
> removes anything from the lists) I'd say it's ok to an exception in
> this case.
> 
> Kevin?

Yeah - probably best to "open code" linked lists if they are needed in
16bit mode.

Cheers,
-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to