File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767
6868#ifdef _KERNEL
6969#include <sys/cdefs.h>
70- __KERNEL_RCSID (0 , "$NetBSD: npf_nat.c,v 1.52 2022/04/09 23:38:33 riastradh Exp $" );
70+ __KERNEL_RCSID (0 , "$NetBSD: npf_nat.c,v 1.53 2023/02/24 11:03:01 riastradh Exp $" );
7171
7272#include <sys/param.h>
7373#include <sys/types.h>
@@ -279,15 +279,11 @@ npf_natpolicy_release(npf_natpolicy_t *np)
279279{
280280 KASSERT (atomic_load_relaxed (& np -> n_refcnt ) > 0 );
281281
282- #ifndef __HAVE_ATOMIC_AS_MEMBAR
283282 membar_release ();
284- #endif
285283 if (atomic_dec_uint_nv (& np -> n_refcnt ) != 0 ) {
286284 return ;
287285 }
288- #ifndef __HAVE_ATOMIC_AS_MEMBAR
289286 membar_acquire ();
290- #endif
291287 KASSERT (LIST_EMPTY (& np -> n_nat_list ));
292288 mutex_destroy (& np -> n_lock );
293289 kmem_free (np , sizeof (npf_natpolicy_t ));
Original file line number Diff line number Diff line change 3333
3434#ifdef _KERNEL
3535#include <sys/cdefs.h>
36- __KERNEL_RCSID (0 , "$NetBSD: npf_rproc.c,v 1.22 2022/04/09 23:38:33 riastradh Exp $" );
36+ __KERNEL_RCSID (0 , "$NetBSD: npf_rproc.c,v 1.23 2023/02/24 11:03:01 riastradh Exp $" );
3737
3838#include <sys/param.h>
3939#include <sys/types.h>
@@ -330,15 +330,12 @@ npf_rproc_release(npf_rproc_t *rp)
330330{
331331 KASSERT (atomic_load_relaxed (& rp -> rp_refcnt ) > 0 );
332332
333- #ifndef __HAVE_ATOMIC_AS_MEMBAR
334333 membar_release ();
335- #endif
336334 if (atomic_dec_uint_nv (& rp -> rp_refcnt ) != 0 ) {
337335 return ;
338336 }
339- #ifndef __HAVE_ATOMIC_AS_MEMBAR
340337 membar_acquire ();
341- #endif
338+
342339 /* XXXintr */
343340 for (unsigned i = 0 ; i < rp -> rp_ext_count ; i ++ ) {
344341 npf_ext_t * ext = rp -> rp_ext [i ];
Original file line number Diff line number Diff line change 4646
4747#ifdef _KERNEL
4848#include <sys/cdefs.h>
49- __KERNEL_RCSID (0 , "$NetBSD: npf_tableset.c,v 1.41 2023/01/23 13:40:04 riastradh Exp $" );
49+ __KERNEL_RCSID (0 , "$NetBSD: npf_tableset.c,v 1.42 2023/02/24 11:03:01 riastradh Exp $" );
5050
5151#include <sys/param.h>
5252#include <sys/types.h>
@@ -160,14 +160,10 @@ npf_tableset_destroy(npf_tableset_t *ts)
160160
161161 if (t == NULL )
162162 continue ;
163- #ifndef __HAVE_ATOMIC_AS_MEMBAR
164163 membar_release ();
165- #endif
166164 if (atomic_dec_uint_nv (& t -> t_refcnt ) > 0 )
167165 continue ;
168- #ifndef __HAVE_ATOMIC_AS_MEMBAR
169166 membar_acquire ();
170- #endif
171167 npf_table_destroy (t );
172168 }
173169 kmem_free (ts , NPF_TABLESET_SIZE (ts -> ts_nitems ));
You can’t perform that action at this time.
0 commit comments