Re: any local implementations of linked lists?

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

 



On Sun, 23 Mar 2008, Julia Lawall wrote:

> On Sun, 23 Mar 2008, Robert P. J. Day wrote:
>
> >
> >   as i'm currently perusing the implementation of the kernel linked
> > list, it occurred to me to wonder if there are still parts of the
> > kernel that insist on implementing their own design unnecessarily
> > (which they're not supposed to do).  anyone know of any such examples,
> > out of curiosity?  thanks.
>
> There are a lot of occurrences of structures that have a field of type
> pointer to the structure, often with the suggestive name "next".  But at
> least some of them have only a next field and no prev field.  Are you
> interested in them anyway?
>
> An example is:
>
> arch/um/include/aio.h
>
>  struct aio_context {
>         int reply_fd;
>         struct aio_context *next;
>  };

based on my own grepping, i noticed a zillion of those things -- i'm
just thinking that some of them are probably local implementations of
a linked list structure that could be rewritten using the in-kernel
linked list structure defined in <linux/list.h>.

i doubt that could be done quickly -- it's undoubtedly a long-term
project that could be transformed little by little as people run
across examples of it.  just something to keep an eye out for if
you're feeling ambitious.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux