Page MenuHomeFreeBSD

D30041.diff
No OneTemporary

D30041.diff

diff --git a/sys/sys/seqc.h b/sys/sys/seqc.h
--- a/sys/sys/seqc.h
+++ b/sys/sys/seqc.h
@@ -45,13 +45,15 @@
#include <machine/cpu.h>
+#define SEQC_MOD 1
+
/*
* Predicts from inline functions are not honored by clang.
*/
#define seqc_in_modify(seqc) ({ \
seqc_t __seqc = (seqc); \
\
- __predict_false(__seqc & 1); \
+ __predict_false(__seqc & SEQC_MOD); \
})
static __inline void
@@ -60,7 +62,7 @@
critical_enter();
MPASS(!seqc_in_modify(*seqcp));
- *seqcp += 1;
+ *seqcp += SEQC_MOD;
atomic_thread_fence_rel();
}
@@ -69,7 +71,7 @@
{
atomic_thread_fence_rel();
- *seqcp += 1;
+ *seqcp += SEQC_MOD;
MPASS(!seqc_in_modify(*seqcp));
critical_exit();
}
@@ -85,7 +87,7 @@
seqc_read_notmodify(const seqc_t *seqcp)
{
- return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)) & ~1);
+ return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)) & ~SEQC_MOD);
}
static __inline seqc_t
@@ -126,7 +128,7 @@
{
MPASS(!seqc_in_modify(*seqcp));
- *seqcp += 1;
+ *seqcp += SEQC_MOD;
atomic_thread_fence_rel();
}
@@ -135,7 +137,7 @@
{
atomic_thread_fence_rel();
- *seqcp += 1;
+ *seqcp += SEQC_MOD;
MPASS(!seqc_in_modify(*seqcp));
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 9:12 AM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14925344
Default Alt Text
D30041.diff (1 KB)

Event Timeline