blob: 9e0d444ac88df162c51eef8b74aa0d98091d9d95 [file] [log] [blame]
Jeff Layton84cbada2017-07-06 07:02:24 -04001#ifndef _LINUX_ERRSEQ_H
2#define _LINUX_ERRSEQ_H
3
4/* See lib/errseq.c for more info */
5
6typedef u32 errseq_t;
7
8errseq_t __errseq_set(errseq_t *eseq, int err);
9static 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
16errseq_t errseq_sample(errseq_t *eseq);
17int errseq_check(errseq_t *eseq, errseq_t since);
18int errseq_check_and_advance(errseq_t *eseq, errseq_t *since);
19#endif