xref: /third_party/ltp/include/tst_module.h (revision f08c3bdf)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
4 * Alexey Kodanev <alexey.kodanev@oracle.com>
5 */
6
7#ifndef TST_MODULE_H
8#define TST_MODULE_H
9
10void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name,
11					 char **mod_path);
12
13static inline void tst_module_exists(const char *mod_name, char **mod_path)
14{
15	tst_module_exists_(NULL, mod_name, mod_path);
16}
17
18void tst_module_load_(void (cleanup_fn)(void), const char *mod_name,
19					char *const argv[]);
20
21static inline void tst_module_load(const char *mod_name, char *const argv[])
22{
23	tst_module_load_(NULL, mod_name, argv);
24}
25
26void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name);
27
28static inline void tst_module_unload(const char *mod_name)
29{
30	tst_module_unload_(NULL, mod_name);
31}
32
33#endif /* TST_MODULE_H */
34