mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +01:00
build: Migrate G_ATOMIC_LOCK_FREE docs from configure.ac to meson.build
The explanation of how G_ATOMIC_LOCK_FREE is meant to be used is useful. Signed-off-by: Philip Withnall <withnall@endlessm.com> Reviewed-by: nobody
This commit is contained in:
parent
3c9a7ec270
commit
c16e8af351
13
meson.build
13
meson.build
@ -1434,6 +1434,19 @@ else
|
||||
endif
|
||||
glibconfig_conf.set('G_ATOMIC_OP_MEMORY_BARRIER_NEEDED', glib_memory_barrier_needed)
|
||||
|
||||
# We need to decide at configure time if GLib will use real atomic
|
||||
# operations ("lock free") or emulated ones with a mutex. This is
|
||||
# because we must put this information in glibconfig.h so we know if
|
||||
# it is safe or not to inline using compiler intrinsics directly from
|
||||
# the header.
|
||||
#
|
||||
# We also publish the information via G_ATOMIC_LOCK_FREE in case the
|
||||
# user is interested in knowing if they can use the atomic ops across
|
||||
# processes.
|
||||
#
|
||||
# We can currently support the atomic ops natively when building GLib
|
||||
# with recent versions of GCC or MSVC.
|
||||
#
|
||||
# Note that the atomic ops are only available with GCC on x86 when
|
||||
# using -march=i486 or higher. If we detect that the atomic ops are
|
||||
# not available but would be available given the right flags, we want
|
||||
|
Loading…
Reference in New Issue
Block a user