[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 02/11] rcu_queue: remove barrier from QLIST_EMPTY
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v2 02/11] rcu_queue: remove barrier from QLIST_EMPTY_RCU |
Date: |
Sun, 19 Aug 2018 05:13:26 -0400 |
It's unnecessary because the pointer isn't dereferenced.
Signed-off-by: Emilio G. Cota <address@hidden>
---
include/qemu/rcu_queue.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/rcu_queue.h b/include/qemu/rcu_queue.h
index dd7b3be043..6881ea5274 100644
--- a/include/qemu/rcu_queue.h
+++ b/include/qemu/rcu_queue.h
@@ -36,7 +36,7 @@ extern "C" {
/*
* List access methods.
*/
-#define QLIST_EMPTY_RCU(head) (atomic_rcu_read(&(head)->lh_first) == NULL)
+#define QLIST_EMPTY_RCU(head) (atomic_read(&(head)->lh_first) == NULL)
#define QLIST_FIRST_RCU(head) (atomic_rcu_read(&(head)->lh_first))
#define QLIST_NEXT_RCU(elm, field) (atomic_rcu_read(&(elm)->field.le_next))
--
2.17.1
- [Qemu-devel] [PATCH v2 00/11] convert CPU list to RCU, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 02/11] rcu_queue: remove barrier from QLIST_EMPTY_RCU,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v2 07/11] test-rcu-list: abstract the list implementation, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 01/11] rcu_queue: use atomic_set in QLIST_REMOVE_RCU, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 10/11] spapr: do not use CPU_FOREACH_REVERSE, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 03/11] rcu_queue: add RCU QSIMPLEQ, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 11/11] qom: convert the CPU list to RCU, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 06/11] test-rcu-list: access counters with atomics, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 04/11] rcu_queue: add RCU QTAILQ, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 09/11] tests: add test-rcu-tailq, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 08/11] tests: add test-list-simpleq, Emilio G. Cota, 2018/08/19
- [Qemu-devel] [PATCH v2 05/11] test-rcu-list: access goflag with atomics, Emilio G. Cota, 2018/08/19