diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-11-11 10:30:54 +0200 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-11-12 17:45:47 +0200 |
commit | 602003c3d751c72fc309a0e64d4193f6da720f6b (patch) | |
tree | 5e29d9b685f8268a9ad56f52ad788f4300ddc289 /lib/Makefile.sources | |
parent | 5997df31db10f190fe8b70d920b6a6b8d3b24126 (diff) |
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: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/Makefile.sources')
-rw-r--r-- | lib/Makefile.sources | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 34e0c012d..1b58b6d0c 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -41,6 +41,8 @@ lib_source_list = \ igt_halffloat.h \ igt_infoframe.c \ igt_infoframe.h \ + igt_list.c \ + igt_list.h \ igt_matrix.c \ igt_matrix.h \ igt_primes.c \ |