[igt-dev] [PATCH i-g-t 03/29] lib/igt_core: update longjmp buffers to type sigjmp_buf
D Scott Phillips
d.scott.phillips at intel.com
Wed Dec 11 00:52:09 UTC 2019
sigsetjmp/siglongjmp operate on a different type from
setjmp/longjmp, sigjmp_buf vs jmp_buf. On glibc these happen to be
the same type, but on other platforms they may be different.
Signed-off-by: D Scott Phillips <d.scott.phillips at intel.com>
---
lib/igt_core.c | 2 +-
lib/igt_core.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index c705be1e..09d8c159 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1328,7 +1328,7 @@ static void exit_subtest(const char *result)
const char *subtest_text = in_dynamic_subtest ? "Dynamic subtest" : "Subtest";
const char **subtest_name = in_dynamic_subtest ? &in_dynamic_subtest : &in_subtest;
struct timespec *thentime = in_dynamic_subtest ? &dynamic_subtest_time : &subtest_time;
- jmp_buf *jmptarget = in_dynamic_subtest ? &igt_dynamic_jmpbuf : &igt_subtest_jmpbuf;
+ sigjmp_buf *jmptarget = in_dynamic_subtest ? &igt_dynamic_jmpbuf : &igt_subtest_jmpbuf;
igt_gettime(&now);
diff --git a/lib/igt_core.h b/lib/igt_core.h
index c17a7ba8..e99b782f 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -145,8 +145,8 @@ void __igt_fixture_end(void) __attribute__((noreturn));
__igt_fixture_complete())
/* subtest infrastructure */
-jmp_buf igt_subtest_jmpbuf;
-jmp_buf igt_dynamic_jmpbuf;
+sigjmp_buf igt_subtest_jmpbuf;
+sigjmp_buf igt_dynamic_jmpbuf;
typedef int (*igt_opt_handler_t)(int opt, int opt_index, void *data);
#define IGT_OPT_HANDLER_SUCCESS 0
#define IGT_OPT_HANDLER_ERROR -2
--
2.23.0
More information about the igt-dev
mailing list