1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) 2020 Linaro Limited. All rights reserved. 4 * Author: Viresh Kumar <viresh.kumar@linaro.org> 5 */ 6 7 #ifndef SIGWAIT_H__ 8 #define SIGWAIT_H__ 9 10 #include "tst_test.h" 11 #include "tst_timer.h" 12 #include <signal.h> 13 14 /* swi: sigwaitinfo() */ 15 typedef int (*swi_func) (const sigset_t * set, siginfo_t * info, 16 void * timeout); 17 typedef void (*test_func) (swi_func, int, enum tst_ts_type type); 18 19 struct sigwait_test_desc { 20 test_func tf; 21 int signo; 22 }; 23 24 void test_empty_set(swi_func sigwaitinfo, int signo, 25 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 26 void test_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type); 27 void test_unmasked_matching(swi_func sigwaitinfo, int signo, 28 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 29 void test_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo, 30 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 31 void test_masked_matching(swi_func sigwaitinfo, int signo, 32 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 33 void test_masked_matching_rt(swi_func sigwaitinfo, int signo, 34 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 35 void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo, 36 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 37 void test_bad_address(swi_func sigwaitinfo, int signo, 38 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 39 void test_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED, 40 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 41 void test_bad_address3(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED, 42 enum tst_ts_type type LTP_ATTRIBUTE_UNUSED); 43 void sigwait_setup(void); 44 #endif /* SIGWAIT_H__ */ 45