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

Function ipsec_kmod_enter

freebsd/netipsec/subr_ipsec.c:129–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127
128#define IPSEC_MODULE_INCR 2
129static int
130ipsec_kmod_enter(volatile u_int *cntr)
131{
132 u_int old, new;
133
134 do {
135 old = *cntr;
136 if ((old & IPSEC_MODULE_ENABLED) == 0)
137 return (ENXIO);
138 new = old + IPSEC_MODULE_INCR;
139 } while(atomic_cmpset_acq_int(cntr, old, new) == 0);
140 return (0);
141}
142
143static void
144ipsec_kmod_exit(volatile u_int *cntr)

Callers 1

xform_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected