mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:47:47 +00:00
lib: Add a thread_is_scheduled function
The function thread_is_scheduled allows us to know if the particular thread is scheduled for execution or not. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
52e458d922
commit
a505383d6a
@ -2059,3 +2059,11 @@ void debug_signals(const sigset_t *sigs)
|
|||||||
|
|
||||||
zlog_debug("%s: %s", __func__, buf);
|
zlog_debug("%s: %s", __func__, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool thread_is_scheduled(struct thread *thread)
|
||||||
|
{
|
||||||
|
if (thread == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -273,6 +273,7 @@ extern pthread_key_t thread_current;
|
|||||||
extern char *thread_timer_to_hhmmss(char *buf, int buf_size,
|
extern char *thread_timer_to_hhmmss(char *buf, int buf_size,
|
||||||
struct thread *t_timer);
|
struct thread *t_timer);
|
||||||
|
|
||||||
|
extern bool thread_is_scheduled(struct thread *thread);
|
||||||
/* Debug signal mask */
|
/* Debug signal mask */
|
||||||
void debug_signals(const sigset_t *sigs);
|
void debug_signals(const sigset_t *sigs);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user