Re: Extended Kernel API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2004-03-14 at 22:33, Zeeshan Ali wrote:
> Hello,
> 
> > The linked list implementation is generic, and it is
> > not kernel-oriented as you claimed.
> 
>     It certainly is, as it requires the list_head to
> be the part of the data. Please correct me if i am
> wrong. 
> 
> In kernel:
> 
> typedef struct list_head {
>         struct list_head *next, *prev;
> } list_t;
> 
> In glib:
> 
> struct GList
> {
>   gpointer data;
>   GList *next;
>   GList *prev;
> };

Basically this wastes 4 bytes (or whatever gpointer is in size and
aligned) per list-element of physical (read: not swappable) space.
While it is "tuned" for a kernel, is is also generic enough that many
other structs use it (and the related macros/inline functions/...).

> > Is there a need for hashtables?
>    
>      Yes of course. I need it and i know that others
> may need it as well.

Propose one (at best also used by an existing driver/module/what-ever).
Or even better extract one existing and make a (more) generic version
out of it.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux