diff options
| author | David Lamparter <equinox@diac24.net> | 2019-06-19 12:52:38 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2019-07-31 03:33:41 +0200 | 
| commit | 2a5e62359f737b233a8b06731ce60f915a754d72 (patch) | |
| tree | 35ce7d3ab51fc38fc1b2ba5f56075c2e17183b31 /lib/seqlock.h | |
| parent | 6046b690b53a5e1c14ccf261304f5aa1f53546ae (diff) | |
lib/seqlock: add timed-wait operation
seqlock_timedwait() puts an (absolute, CLOCK_MONOTONIC) deadline on how
long we wait.  The RCU code uses this for its watchdog implementation.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/seqlock.h')
| -rw-r--r-- | lib/seqlock.h | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/seqlock.h b/lib/seqlock.h index 0f5dc47cd7..3cce9ccf49 100644 --- a/lib/seqlock.h +++ b/lib/seqlock.h @@ -82,6 +82,8 @@ extern void seqlock_init(struct seqlock *sqlo);  /* while (sqlo <= val) - wait until seqlock->pos > val, or seqlock unheld */  extern void seqlock_wait(struct seqlock *sqlo, seqlock_val_t val); +extern bool seqlock_timedwait(struct seqlock *sqlo, seqlock_val_t val, +			      const struct timespec *abs_monotime_limit);  extern bool seqlock_check(struct seqlock *sqlo, seqlock_val_t val);  static inline bool seqlock_held(struct seqlock *sqlo)  | 
