1
0
Fork 0
Commit graph

2 commits

Author SHA1 Message Date
Neil Roberts
7b50c38cc8 cogl-queue: Make suitable for use in Cogl source code
This modifies cogl-queue.h so that:-

- Everything is in a COGL_* namespace

- It assumes there is a typedef for all of the types instead of
  requiring the code to use struct WhateverType.

- It doesn't contain any tabs

https://bugzilla.gnome.org/show_bug.cgi?id=652514
2011-07-01 17:52:55 +01:00
Neil Roberts
17c9cb8d49 Add the code from FreeBSD for their linked-list/queue implementation
This directly copies in the header from the FreeBSD kernel for their
linked-list implementation. A later patch will modify it but this
patch is here so we can have a clear patch to show what the
changes are.

Using the list implementation from this header is beneficial as
opposed to using GList because it's possible to embed the list
pointers directly into another struct. This saves a separate
allocation and it also makes it possible to remove an item from the
list without having to iterate the entire list to find its list
node. The header provides four different list types: single and
doubley linked lists and each of them can either have a header with
pointers to the beginning and end or just to the beginning. Glib
effectively only provides single and doubley linked lists with a
pointer to the beginning or a doubley-linked list with a pointer to
both (GQueue).

https://bugzilla.gnome.org/show_bug.cgi?id=652514
2011-07-01 17:52:55 +01:00