diff options
author | Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> | 2023-09-01 16:38:38 +0200 |
---|---|---|
committer | Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> | 2023-09-19 10:37:21 +0200 |
commit | 1674d77aeee40146b720de6b4686e27b9b2d6dd7 (patch) | |
tree | 098d8c0f62ec627e2b682b4b5fd6b0c4d4b2951c /lib/igt_ktap.h | |
parent | 10d420831879263305fafcdb71d80251e28c8433 (diff) |
lib/ktap: Use IGT linked lists for storing KTAP results
For code simplicity and clarity, use existing IGT linked lists library
instead of open coding a custom implementation of a list of KTAP results.
While being at it, flatten the code by inverting a check for pending
results.
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'lib/igt_ktap.h')
-rw-r--r-- | lib/igt_ktap.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/igt_ktap.h b/lib/igt_ktap.h index 991800e91..b4d7a6dbc 100644 --- a/lib/igt_ktap.h +++ b/lib/igt_ktap.h @@ -28,16 +28,18 @@ #include <pthread.h> +#include "igt_list.h" + void *igt_ktap_parser(void *unused); typedef struct ktap_test_results_element { char test_name[BUF_LEN + 1]; bool passed; - struct ktap_test_results_element *next; + struct igt_list_head link; } ktap_test_results_element; struct ktap_test_results { - ktap_test_results_element *head; + struct igt_list_head list; pthread_mutex_t mutex; bool still_running; }; |