diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2022-01-21 09:01:42 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-21 09:01:42 -0600 |
| commit | cdaa204effe98908a2396b528fdfe0d8dfe4393c (patch) | |
| tree | 7943c9b7a689662f315823ea1fa912816994b823 /lib/thread.h | |
| parent | c63f4b0ffdd1fd4c08f6ccc15fa3144a6cd4d4ea (diff) | |
| parent | e8b3a2f74b707529c70908c6afc97a486588ef30 (diff) | |
Merge pull request #8011 from donaldsharp/starvation
lib: Figure out if we are being starved for cpu
Diffstat (limited to 'lib/thread.h')
| -rw-r--r-- | lib/thread.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/thread.h b/lib/thread.h index 49a70696d0..660f8bd28e 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -126,6 +126,7 @@ struct thread { unsigned long yield; /* yield time in microseconds */ const struct xref_threadsched *xref; /* origin location */ pthread_mutex_t mtx; /* mutex for thread.c functions */ + bool ignore_timer_late; }; #ifdef _FRR_ATTRIBUTE_PRINTFRR @@ -285,6 +286,11 @@ extern bool thread_is_scheduled(struct thread *thread); /* Debug signal mask */ void debug_signals(const sigset_t *sigs); +static inline void thread_ignore_late_timer(struct thread *thread) +{ + thread->ignore_timer_late = true; +} + #ifdef __cplusplus } #endif |
