Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\errseq.c Create Date:2022-07-28 06:25:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:seq_check_and_advance() - Check an errseq_t and advance to current value

Proto:int errseq_check_and_advance(errseq_t *eseq, errseq_t *since)

Type:int

Parameter:

TypeParameterName
errseq_t *eseq
errseq_t *since
176  err = 0
184  old = READ_ONCE( * eseq)
185  If old != since Then
198  new = old | This bit is used as a flag to indicate whether the value has been seen
199  If new != old Then cmpxchg(eseq, old, new)
201  since = new
202  err = -(new & Kernel pointers have redundant information, so we can use a* scheme where we can return either an error code or a normal* pointer with the same return value.* This should be a per-architecture thing, to allow different* error and pointer decisions.)
204  Return err