NetworkManager/shared/nm-glib-aux
Thomas Haller 3c27a3ed5f
shared: fix behavior of NM_G_MUTEX_LOCKED()
The idea of NM_G_MUTEX_LOCKED() macro is not only to register a mutex
for unlocking (via nm_auto_unlock_g_mutex) but also to lock it at
the same time.

That is a useful helper macro. If you have to lock the mutex yourself,
it makes usage less convenient. At which point you don't need the macro
anymore and you should instead take full control and lock/unlock yourself.

Fix the macro and change behavior. The macro was not used so far, so
it's not a problem.

Fixes: dd33b3a14e ('shared: add nm_auto_unlock_g_mutex and NM_G_MUTEX_LOCKED() helper macros')
(cherry picked from commit 098ac7dbc0)
2021-03-12 11:22:15 +01:00
..
tests all: add "nm-default-systemd{,-shared}.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-c-list.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-dbus-aux.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-dbus-aux.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-dedup-multi.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-dedup-multi.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-default-glib-i18n-lib.h all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-default-glib-i18n-prog.h all: add "nm-glib-aux/nm-default-glib-i18n-prog.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-default-glib.h shared: move redefining G_VARIANT_TYPE() to "nm-glib-aux/nm-default-glib.h" 2021-02-09 12:38:19 +01:00
nm-enum-utils.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-enum-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-errno.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-errno.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-gassert-patch.h shared: move "nm-gassert-patch.h" to "nm-glib-aux" 2021-02-09 12:38:19 +01:00
nm-glib.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-hash-utils.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-hash-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-io-utils.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-io-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-jansson.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-json-aux.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-json-aux.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-keyfile-aux.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-keyfile-aux.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-logging-base.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-logging-base.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-logging-fwd.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-macros-internal.h shared: fix behavior of NM_G_MUTEX_LOCKED() 2021-03-12 11:22:15 +01:00
nm-obj.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-random-utils.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-random-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-ref-string.c shared: refactor nm_assert() for NMRefString 2021-02-15 10:24:34 +01:00
nm-ref-string.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-secret-utils.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-secret-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-shared-utils.c shared,dhcp: add _nm_utils_ip4_get_default_prefix0() helper 2021-02-11 09:23:15 +01:00
nm-shared-utils.h shared,dhcp: add _nm_utils_ip4_get_default_prefix0() helper 2021-02-11 09:23:15 +01:00
nm-str-buf.h shared: return NMStrBuf instance from nm_str_buf_reset() 2021-02-11 09:23:07 +01:00
nm-time-utils.c all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-time-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-value-type.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00