1 /* 2 * Copyright (c) 2016 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_INCLUDE_THREAD_MONITOR_H_ 8 #define ZEPHYR_INCLUDE_THREAD_MONITOR_H_ 9 10 #include <zephyr/kernel.h> 11 #include <zephyr/kernel_structs.h> 12 13 /** 14 * @brief Head element of the thread monitor list. 15 * 16 * @details Access the head element of the thread monitor list. 17 * 18 */ 19 #define SYS_THREAD_MONITOR_HEAD ((struct k_thread *)(_kernel.threads)) 20 21 /** 22 * @brief Gets a thread node's next element. 23 * 24 * @details Given a node in a thread monitor list, gets the next 25 * element in the list. 26 * 27 * @param obj Object to get the next element from. 28 */ 29 #define SYS_THREAD_MONITOR_NEXT(obj) (((struct k_thread *)obj)->next_thread) 30 31 #endif /* ZEPHYR_INCLUDE_THREAD_MONITOR_H_ */ 32