[gjs] mem-private: Do not use volatile for atomic values
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] mem-private: Do not use volatile for atomic values
- Date: Tue, 18 May 2021 05:40:30 +0000 (UTC)
commit fe97703b2185fcd9b71bc0a6b0e8f8103e58a34b
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed May 12 16:37:59 2021 +0200
mem-private: Do not use volatile for atomic values
Following what GLib did as well everywhere.
gjs/mem-private.h | 2 +-
test/gjs-test-rooting.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gjs/mem-private.h b/gjs/mem-private.h
index c8f2c040..8350bde6 100644
--- a/gjs/mem-private.h
+++ b/gjs/mem-private.h
@@ -8,7 +8,7 @@
#include <glib.h>
typedef struct {
- volatile int value;
+ int value;
const char* name;
} GjsMemCounter;
diff --git a/test/gjs-test-rooting.cpp b/test/gjs-test-rooting.cpp
index 72a66f4d..cb878554 100644
--- a/test/gjs-test-rooting.cpp
+++ b/test/gjs-test-rooting.cpp
@@ -24,7 +24,7 @@ void g_assertion_message(const char*, const char*, int, const char*,
static GMutex gc_lock;
static GCond gc_finished;
-static volatile int gc_counter;
+static int gc_counter;
#define PARENT(fx) ((GjsUnitTestFixture *)fx)
struct GjsRootingFixture {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]