2016-02-17 21:56:57 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-19 02:01:01 +01:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-02-17 21:56:57 +01:00
|
|
|
*/
|
|
|
|
|
2021-04-19 05:24:40 +02:00
|
|
|
#ifndef ZEPHYR_INCLUDE_THREAD_MONITOR_H_
|
|
|
|
#define ZEPHYR_INCLUDE_THREAD_MONITOR_H_
|
2016-10-19 23:10:46 +02:00
|
|
|
|
2022-05-06 10:30:42 +02:00
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/kernel_structs.h>
|
2016-03-09 22:57:41 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Head element of the thread monitor list.
|
|
|
|
*
|
|
|
|
* @details Access the head element of the thread monitor list.
|
|
|
|
*
|
|
|
|
*/
|
2016-11-08 16:36:50 +01:00
|
|
|
#define SYS_THREAD_MONITOR_HEAD ((struct k_thread *)(_kernel.threads))
|
2016-03-09 22:57:41 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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 16:36:50 +01:00
|
|
|
#define SYS_THREAD_MONITOR_NEXT(obj) (((struct k_thread *)obj)->next_thread)
|
2016-03-09 22:57:41 +01:00
|
|
|
|
2021-04-19 05:24:40 +02:00
|
|
|
#endif /* ZEPHYR_INCLUDE_THREAD_MONITOR_H_ */
|