Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/include/linux linux/llist: Use membar_...



details:   https://anonhg.NetBSD.org/src/rev/8d62ea301042
branches:  trunk
changeset: 365160:8d62ea301042
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Apr 09 23:43:55 2022 +0000

description:
linux/llist: Use membar_release and membar_datadep_consumer.

No need for membar_acquire here!  Loads are all data-dependent.

diffstat:

 sys/external/bsd/drm2/include/linux/llist.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e607b36f3507 -r 8d62ea301042 sys/external/bsd/drm2/include/linux/llist.h
--- a/sys/external/bsd/drm2/include/linux/llist.h       Sat Apr 09 23:43:39 2022 +0000
+++ b/sys/external/bsd/drm2/include/linux/llist.h       Sat Apr 09 23:43:55 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: llist.h,v 1.6 2021/12/19 11:52:08 riastradh Exp $      */
+/*     $NetBSD: llist.h,v 1.7 2022/04/09 23:43:55 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
        do {
                first = head->first;
                node->next = first;
-               membar_exit();
+               membar_release();
        } while (atomic_cas_ptr(&head->first, first, node) != first);
 
        return first == NULL;
@@ -96,7 +96,7 @@
        struct llist_node *first;
 
        first = atomic_swap_ptr(&head->first, NULL);
-       membar_enter();
+       membar_datadep_consumer();
 
        return first;
 }



Home | Main Index | Thread Index | Old Index