| 141 | } |
| 142 | |
| 143 | static void |
| 144 | ipsec_kmod_exit(volatile u_int *cntr) |
| 145 | { |
| 146 | u_int old, new; |
| 147 | |
| 148 | do { |
| 149 | old = *cntr; |
| 150 | new = old - IPSEC_MODULE_INCR; |
| 151 | } while (atomic_cmpset_rel_int(cntr, old, new) == 0); |
| 152 | } |
| 153 | |
| 154 | static void |
| 155 | ipsec_kmod_drain(volatile u_int *cntr) |