Skip to content

Commit

Permalink
gst: don't use volatile to mean atomic
Browse files Browse the repository at this point in the history
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in gst-plugins-good#868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1219>
  • Loading branch information
ocrete committed Jun 26, 2021
1 parent 8c04f4b commit 0adc6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gst-libs/gst/gl/egl/gstglmemoryegl.c
Expand Up @@ -266,7 +266,7 @@ gst_gl_memory_egl_allocator_init (GstGLMemoryEGLAllocator * allocator)
void
gst_gl_memory_egl_init_once (void)
{
static volatile gsize _init = 0;
static gsize _init = 0;

if (g_once_init_enter (&_init)) {
gst_gl_memory_init_once ();
Expand Down

0 comments on commit 0adc6cc

Please sign in to comment.