diff options
Diffstat (limited to 'include/linux/errseq.h')
-rw-r--r-- | include/linux/errseq.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/errseq.h b/include/linux/errseq.h new file mode 100644 index 000000000000..9e0d444ac88d --- /dev/null +++ b/include/linux/errseq.h @@ -0,0 +1,19 @@ +#ifndef _LINUX_ERRSEQ_H +#define _LINUX_ERRSEQ_H + +/* See lib/errseq.c for more info */ + +typedef u32 errseq_t; + +errseq_t __errseq_set(errseq_t *eseq, int err); +static inline void errseq_set(errseq_t *eseq, int err) +{ + /* Optimize for the common case of no error */ + if (unlikely(err)) + __errseq_set(eseq, err); +} + +errseq_t errseq_sample(errseq_t *eseq); +int errseq_check(errseq_t *eseq, errseq_t since); +int errseq_check_and_advance(errseq_t *eseq, errseq_t *since); +#endif |