1 /* 2 * Copyright (c) 2022 Nordic Semiconductor ASA 3 * Copyright (c) 2023 Codecoup 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef MOCKS_KERNEL_H_ 9 #define MOCKS_KERNEL_H_ 10 11 #include <zephyr/fff.h> 12 #include <zephyr/kernel.h> 13 14 void mock_kernel_init(void); 15 void mock_kernel_cleanup(void); 16 17 DECLARE_FAKE_VALUE_FUNC(k_ticks_t, z_timeout_remaining, const struct _timeout *); 18 DECLARE_FAKE_VALUE_FUNC(int, k_work_schedule, struct k_work_delayable *, k_timeout_t); 19 DECLARE_FAKE_VALUE_FUNC(bool, k_work_cancel_delayable_sync, struct k_work_delayable *, 20 struct k_work_sync *); 21 DECLARE_FAKE_VALUE_FUNC(int, k_sem_take, struct k_sem *, k_timeout_t); 22 DECLARE_FAKE_VOID_FUNC(k_sem_give, struct k_sem *); 23 24 #endif /* MOCKS_KERNEL_H_ */ 25