Skip to content
Snippets Groups Projects
Commit 602003c3 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

lib/igt_list: Update, clean-up and document igt_list


Our list was something between Wayland and Linux Kernel list
implementations, right in the uncanny valley.

On top of that it falsely claimed that it's a straight copy from the
Wayland project.

Let's make our impl more akin to the kernel one to ease the cognitive
dissonance for the developers working on all those projects.

This patch:
 * mimics the current kernel list interface
 * separates IGT helpers in the source files
 * adds brief explanation and code example for igt-doc
 * introduces igt_list.c as static inlines are not visible in the docs

v2: mimic the kernel instead of wayland (Chris)
    - _head suffix for the sentinel/link struct
    - _entry_ in iterator names that go over the elements
v3: I forgot to merge this in time and there was another call site
    that had to be converted in gem_spin_batch.c

Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarPetri Latvala <petri.latvala@intel.com>
parent 5997df31
No related branches found
No related tags found
No related merge requests found
Pipeline #78334 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment