Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Internal kunit try catch implementation to be shared with tests.
0004  *
0005  * Copyright (C) 2019, Google LLC.
0006  * Author: Brendan Higgins <brendanhiggins@google.com>
0007  */
0008 
0009 #ifndef _KUNIT_TRY_CATCH_IMPL_H
0010 #define _KUNIT_TRY_CATCH_IMPL_H
0011 
0012 #include <kunit/try-catch.h>
0013 #include <linux/types.h>
0014 
0015 struct kunit;
0016 
0017 static inline void kunit_try_catch_init(struct kunit_try_catch *try_catch,
0018                     struct kunit *test,
0019                     kunit_try_catch_func_t try,
0020                     kunit_try_catch_func_t catch)
0021 {
0022     try_catch->test = test;
0023     try_catch->try = try;
0024     try_catch->catch = catch;
0025 }
0026 
0027 #endif /* _KUNIT_TRY_CATCH_IMPL_H */