summaryrefslogtreecommitdiff
path: root/include/linux/errseq.h
blob: 9e0d444ac88df162c51eef8b74aa0d98091d9d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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