seqc: add seqc_read_notmodify
The routine can be used when the caller does not expect to ever have to wait for anything. Checking later with seqc_consistent retains all the guarantees.
This commit is contained in:
parent
71a6a0b545
commit
65f775157e
@ -81,6 +81,13 @@ seqc_read_any(const seqc_t *seqcp)
|
||||
return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)));
|
||||
}
|
||||
|
||||
static __inline seqc_t
|
||||
seqc_read_notmodify(const seqc_t *seqcp)
|
||||
{
|
||||
|
||||
return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)) & ~1);
|
||||
}
|
||||
|
||||
static __inline seqc_t
|
||||
seqc_read(const seqc_t *seqcp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user