Jeff Layton | 84cbada | 2017-07-06 07:02:24 -0400 | [diff] [blame^] | 1 | #ifndef _LINUX_ERRSEQ_H |
| 2 | #define _LINUX_ERRSEQ_H |
| 3 | |
| 4 | /* See lib/errseq.c for more info */ |
| 5 | |
| 6 | typedef u32 errseq_t; |
| 7 | |
| 8 | errseq_t __errseq_set(errseq_t *eseq, int err); |
| 9 | static inline void errseq_set(errseq_t *eseq, int err) |
| 10 | { |
| 11 | /* Optimize for the common case of no error */ |
| 12 | if (unlikely(err)) |
| 13 | __errseq_set(eseq, err); |
| 14 | } |
| 15 | |
| 16 | errseq_t errseq_sample(errseq_t *eseq); |
| 17 | int errseq_check(errseq_t *eseq, errseq_t since); |
| 18 | int errseq_check_and_advance(errseq_t *eseq, errseq_t *since); |
| 19 | #endif |