NetworkManager/shared
Thomas Haller fcfd4f4ff2 logging: make nm-logging thread-safe
NetworkManager is single-threaded and uses a mainloop.

However, sometimes we may need multiple threads. For example, we will
need to write sysctl values asynchronously, using the glib thread-pool.
For that to work, we also need to switch the network-namespace of the
thread-pool thread. We want to use NMPNetns for that. Hence it's better
to have NMPNetns thread-safe, instead of coming up with a duplicate
implementation. But NMPNetns may want to log, so we also need nm-logging
thread-safe.

In general, code under "shared/nm-utils" and nm-logging should be usable
from multiple threads. It's simpler to make this code thread-safe than
re-implementing it. Also, it's a bad limitation to be unable to log
from other threads. If there is an error, the best we can often do is to
log about it.

Make nm-logging thread-safe. Actually, we only need to be able to log
from multiple threads. We don't need to setup or configure logging from
multiple threads. This restriction allows us to access logging from the
main-thread without any thread-synchronization (because all changes in
the logging setup are also done from the main-thread).

So, while logging from other threads requires a mutex, logging from the
main-thread is lock-free.
2019-02-05 08:18:08 +01:00
..
c-list shared/c-list: re-import from latest c-util/c-list 2018-08-01 12:57:34 +02:00
c-rbtree build: meson: Add trailing commas 2018-12-20 13:50:34 +01:00
c-siphash build: meson: Add trailing commas 2018-12-20 13:50:34 +01:00
n-acd build: meson: Add trailing commas 2018-12-20 13:50:34 +01:00
nm-utils logging: make nm-logging thread-safe 2019-02-05 08:18:08 +01:00
systemd logging: make nm-logging thread-safe 2019-02-05 08:18:08 +01:00
meson.build libnm: use "libnm-systemd-shared.a" in "libnm-core.la" (and "libnm.so") 2019-01-02 17:08:41 +01:00
nm-common-macros.h manager: add connectivity-check-{available,enabled} properties. 2017-08-17 22:31:47 +02:00
nm-dbus-compat.h build: rename directory "include" to "shared" 2015-12-24 11:42:37 +01:00
nm-default.h systemd: move basic systemd library to shared/nm-utils 2019-01-02 17:07:13 +01:00
nm-dispatcher-api.h build: cleanup src/Makefile.am 2016-08-11 11:54:18 +02:00
nm-ethtool-utils.c all/ethtool: add support for all currently supported kernel features 2018-08-10 10:38:19 +02:00
nm-ethtool-utils.h all/ethtool: add support for all currently supported kernel features 2018-08-10 10:38:19 +02:00
nm-meta-setting.c wifi-p2p: rename Wi-Fi P2P 2019-02-01 17:02:57 +01:00
nm-meta-setting.h wifi-p2p: rename Wi-Fi P2P 2019-02-01 17:02:57 +01:00
nm-test-libnm-utils.h tests: add nmtstc_auto_service_cleanup macro 2018-06-25 12:13:28 +02:00
nm-test-utils-impl.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-version-macros.h.in release: bump version to 1.15.0 (development) 2018-09-08 10:24:20 +02:00