mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 06:50:17 +00:00
lib: Make thread_is_scheduled a static inline
For performance, yo. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
c905f04c7c
commit
cfb9e0ee59
@ -2143,14 +2143,6 @@ 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t printfrr_thread_dbg(struct fbuf *buf, struct printfrr_eargs *ea,
|
static ssize_t printfrr_thread_dbg(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||||
const struct thread *thread)
|
const struct thread *thread)
|
||||||
{
|
{
|
||||||
|
@ -283,7 +283,14 @@ 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);
|
static inline bool thread_is_scheduled(struct thread *thread)
|
||||||
|
{
|
||||||
|
if (thread)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* 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