2016-02-18 04:56:57 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-02-18 04:56:57 +08:00
|
|
|
*/
|
|
|
|
|
2021-04-19 11:24:40 +08:00
|
|
|
#ifndef ZEPHYR_INCLUDE_THREAD_MONITOR_H_
|
|
|
|
#define ZEPHYR_INCLUDE_THREAD_MONITOR_H_
|
2016-10-20 05:10:46 +08:00
|
|
|
|
|
|
|
#include <kernel.h>
|
2016-11-08 23:36:50 +08:00
|
|
|
#include <kernel_structs.h>
|
2016-03-10 05:57:41 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @def SYS_THREAD_MONITOR_HEAD
|
|
|
|
*
|
|
|
|
* @brief Head element of the thread monitor list.
|
|
|
|
*
|
|
|
|
* @details Access the head element of the thread monitor list.
|
|
|
|
*
|
|
|
|
*/
|
2016-11-08 23:36:50 +08:00
|
|
|
#define SYS_THREAD_MONITOR_HEAD ((struct k_thread *)(_kernel.threads))
|
2016-03-10 05:57:41 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @def SYS_THREAD_MONITOR_NEXT
|
|
|
|
*
|
|
|
|
* @brief Gets a thread node's next element.
|
|
|
|
*
|
|
|
|
* @details Given a node in a thread monitor list, gets the next
|
|
|
|
* element in the list.
|
|
|
|
*
|
|
|
|
* @param obj Object to get the next element from.
|
|
|
|
*/
|
2016-11-08 23:36:50 +08:00
|
|
|
#define SYS_THREAD_MONITOR_NEXT(obj) (((struct k_thread *)obj)->next_thread)
|
2016-03-10 05:57:41 +08:00
|
|
|
|
2021-04-19 11:24:40 +08:00
|
|
|
#endif /* ZEPHYR_INCLUDE_THREAD_MONITOR_H_ */
|