MCPcopy Create free account
hub / github.com/F-Stack/f-stack / smr_exit

Function smr_exit

freebsd/sys/smr.h:142–162  ·  view source on GitHub ↗

* Exit a read section. */

Source from the content-addressed store, hash-verified

140 * Exit a read section.
141 */
142static inline void
143smr_exit(smr_t smr)
144{
145
146 smr = zpcpu_get(smr);
147 CRITICAL_ASSERT(curthread);
148 KASSERT((smr->c_flags & SMR_LAZY) == 0,
149 ("smr_exit(%s) lazy smr.", smr->c_shared->s_name));
150 KASSERT(smr->c_seq != SMR_SEQ_INVALID,
151 ("smr_exit(%s) not in a smr section.", smr->c_shared->s_name));
152
153 /*
154 * Clear the recorded sequence number. This allows poll() to
155 * detect CPUs not in read sections.
156 *
157 * Use release semantics to retire any stores before the sequence
158 * number is cleared.
159 */
160 atomic_store_rel_int(&smr->c_seq, SMR_SEQ_INVALID);
161 critical_exit();
162}
163
164/*
165 * Enter a lazy smr section. This is used for read-mostly state that

Callers 4

svm_pmap_deactivateFunction · 0.85
vmx_pmap_deactivateFunction · 0.85
pctrie_lookup_unlockedFunction · 0.85
vm_radix_lookup_unlockedFunction · 0.85

Calls 1

critical_exitFunction · 0.70

Tested by

no test coverage detected