From: bluhm Date: Mon, 3 Oct 2022 14:10:53 +0000 (+0000) Subject: Add a second membar producer into counters_zero(). Now it is X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8f25c57f5c43023e6ecba0d0e0d50c014b2d2713;p=openbsd Add a second membar producer into counters_zero(). Now it is symmetric to counters_read(). OK jmatthew@ --- diff --git a/sys/kern/subr_percpu.c b/sys/kern/subr_percpu.c index ef46eae29a0..4cc66d0b81e 100644 --- a/sys/kern/subr_percpu.c +++ b/sys/kern/subr_percpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_percpu.c,v 1.9 2021/03/10 10:21:47 jsg Exp $ */ +/* $OpenBSD: subr_percpu.c,v 1.10 2022/10/03 14:10:53 bluhm Exp $ */ /* * Copyright (c) 2016 David Gwynne @@ -213,6 +213,7 @@ counters_zero(struct cpumem *cm, unsigned int n) unsigned int i; counters = cpumem_first(&cmi, cm); + membar_producer(); do { for (i = 0; i < n; i++) counters[i] = 0;