Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/ip_fw_dynamic.c
| Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | |||||
| #define V_dyn_expired_ipv6 VNET(dyn_expired_ipv6) | #define V_dyn_expired_ipv6 VNET(dyn_expired_ipv6) | ||||
| #endif /* INET6 */ | #endif /* INET6 */ | ||||
| /* | /* | ||||
| * Per-CPU pointer indicates that specified state is currently in use | * Per-CPU pointer indicates that specified state is currently in use | ||||
| * and must not be reclaimed by expiration callout. | * and must not be reclaimed by expiration callout. | ||||
| */ | */ | ||||
| static void **dyn_hp_cache; | static void **dyn_hp_cache; | ||||
| static DPCPU_DEFINE(void *, dyn_hp); | DPCPU_DEFINE_STATIC(void *, dyn_hp); | ||||
| #define DYNSTATE_GET(cpu) ck_pr_load_ptr(DPCPU_ID_PTR((cpu), dyn_hp)) | #define DYNSTATE_GET(cpu) ck_pr_load_ptr(DPCPU_ID_PTR((cpu), dyn_hp)) | ||||
| #define DYNSTATE_PROTECT(v) ck_pr_store_ptr(DPCPU_PTR(dyn_hp), (v)) | #define DYNSTATE_PROTECT(v) ck_pr_store_ptr(DPCPU_PTR(dyn_hp), (v)) | ||||
| #define DYNSTATE_RELEASE() DYNSTATE_PROTECT(NULL) | #define DYNSTATE_RELEASE() DYNSTATE_PROTECT(NULL) | ||||
| #define DYNSTATE_CRITICAL_ENTER() critical_enter() | #define DYNSTATE_CRITICAL_ENTER() critical_enter() | ||||
| #define DYNSTATE_CRITICAL_EXIT() do { \ | #define DYNSTATE_CRITICAL_EXIT() do { \ | ||||
| DYNSTATE_RELEASE(); \ | DYNSTATE_RELEASE(); \ | ||||
| critical_exit(); \ | critical_exit(); \ | ||||
| } while (0); | } while (0); | ||||
| ▲ Show 20 Lines • Show All 2,861 Lines • Show Last 20 Lines | |||||