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