Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 1 | /* |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 2 | * Copyright (c) 2016 Cyril Hrubis <chrubis@suse.cz> |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 3 | * |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 4 | * This program is free software: you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation, either version 2 of the License, or |
| 7 | * (at your option) any later version. |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 8 | * |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 13 | * |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 16 | */ |
| 17 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 18 | #ifndef TST_CHECKPOINT__ |
| 19 | #define TST_CHECKPOINT__ |
Cyril Hrubis | 9f136a4 | 2015-02-17 17:16:09 +0100 | [diff] [blame] | 20 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 21 | #include "tst_checkpoint_fn.h" |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 22 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 23 | #define TST_CHECKPOINT_WAIT(id) \ |
| 24 | tst_safe_checkpoint_wait(__FILE__, __LINE__, NULL, id); |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 25 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 26 | #define TST_CHECKPOINT_WAKE(id) \ |
| 27 | tst_safe_checkpoint_wake(__FILE__, __LINE__, NULL, id, 1); |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 28 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 29 | #define TST_CHECKPOINT_WAKE2(id, nr_wake) \ |
| 30 | tst_safe_checkpoint_wake(__FILE__, __LINE__, NULL, id, nr_wake); |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 31 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 32 | #define TST_CHECKPOINT_WAKE_AND_WAIT(id) \ |
| 33 | tst_safe_checkpoint_wake(__FILE__, __LINE__, NULL, id, 1); \ |
| 34 | tst_safe_checkpoint_wait(__FILE__, __LINE__, NULL, id); |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 35 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 36 | extern const char *tst_ipc_path; |
| 37 | extern char *const tst_ipc_envp[]; |
Cyril Hrubis | ab8388c | 2012-11-28 15:42:17 +0100 | [diff] [blame] | 38 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 39 | #endif /* TST_CHECKPOINT__ */ |