Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys mark the ONCE_DECL() variables as __read_mostly to o...



details:   https://anonhg.NetBSD.org/src/rev/7467ebd2f36a
branches:  trunk
changeset: 320867:7467ebd2f36a
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Mar 03 19:21:59 2018 +0000

description:
mark the ONCE_DECL() variables as __read_mostly to optimize cache placement

diffstat:

 sys/sys/once.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 11a20e8fab31 -r 7467ebd2f36a sys/sys/once.h
--- a/sys/sys/once.h    Sat Mar 03 18:14:27 2018 +0000
+++ b/sys/sys/once.h    Sat Mar 03 19:21:59 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: once.h,v 1.5 2008/10/09 10:48:21 pooka Exp $   */
+/*     $NetBSD: once.h,v 1.6 2018/03/03 19:21:59 jdolecek Exp $        */
 
 /*-
  * Copyright (c)2005 YAMAMOTO Takashi,
@@ -42,7 +42,7 @@
 int _run_once(once_t *, int (*)(void));
 
 #define        ONCE_DECL(o) \
-       once_t (o) = { \
+       once_t (o) __read_mostly = { \
                .o_status = 0, \
        };
 



Home | Main Index | Thread Index | Old Index