mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-22 20:24:51 +02:00
tests: Drop unnecessary volatile qualifiers from tests
These variables were already (correctly) accessed atomically. The `volatile` qualifier doesn’t help with that. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #600
This commit is contained in:
parent
334f695336
commit
8a112c3c6e
@ -17,7 +17,7 @@ gboolean fail;
|
||||
#define ROUNDS 10000
|
||||
|
||||
GObject *object;
|
||||
volatile gint bucket[THREADS];
|
||||
gint bucket[THREADS]; /* accessed from multiple threads, but should never be contested due to the sequence of thread operations */
|
||||
|
||||
static gpointer
|
||||
thread_func (gpointer data)
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
static volatile int mtsafe_call_counter = 0; /* multi thread safe call counter */
|
||||
static int unsafe_call_counter = 0; /* single-threaded call counter */
|
||||
static int mtsafe_call_counter = 0; /* multi thread safe call counter, must be accessed atomically */
|
||||
static int unsafe_call_counter = 0; /* single-threaded call counter */
|
||||
static GCond sync_cond;
|
||||
static GMutex sync_mutex;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user