blob: ae5a68b7839aebbf6e765046c87a66ac9886c44f [file] [log] [blame]
Cyril Hrubisab8388c2012-11-28 15:42:17 +01001/*
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +01002 * Copyright (c) 2016 Cyril Hrubis <chrubis@suse.cz>
Cyril Hrubisab8388c2012-11-28 15:42:17 +01003 *
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +01004 * 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 Hrubisab8388c2012-11-28 15:42:17 +01008 *
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +01009 * 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 Hrubisab8388c2012-11-28 15:42:17 +010013 *
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010014 * 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 Hrubisab8388c2012-11-28 15:42:17 +010016 */
17
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010018#ifndef TST_CHECKPOINT__
19#define TST_CHECKPOINT__
Cyril Hrubis9f136a42015-02-17 17:16:09 +010020
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010021#include "tst_checkpoint_fn.h"
Cyril Hrubisab8388c2012-11-28 15:42:17 +010022
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010023#define TST_CHECKPOINT_WAIT(id) \
24 tst_safe_checkpoint_wait(__FILE__, __LINE__, NULL, id);
Cyril Hrubisab8388c2012-11-28 15:42:17 +010025
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010026#define TST_CHECKPOINT_WAKE(id) \
27 tst_safe_checkpoint_wake(__FILE__, __LINE__, NULL, id, 1);
Cyril Hrubisab8388c2012-11-28 15:42:17 +010028
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010029#define TST_CHECKPOINT_WAKE2(id, nr_wake) \
30 tst_safe_checkpoint_wake(__FILE__, __LINE__, NULL, id, nr_wake);
Cyril Hrubisab8388c2012-11-28 15:42:17 +010031
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010032#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 Hrubisab8388c2012-11-28 15:42:17 +010035
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010036extern const char *tst_ipc_path;
37extern char *const tst_ipc_envp[];
Cyril Hrubisab8388c2012-11-28 15:42:17 +010038
Cyril Hrubisbbdb9f72016-03-16 15:53:57 +010039#endif /* TST_CHECKPOINT__ */