mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Merge branch 'docs-module-constructor-locks' into 'main'
docs: Calling gmodule funcs in constructors may deadlock Closes #1443 See merge request GNOME/glib!4691
This commit is contained in:
@@ -7,6 +7,9 @@ These functions provide a portable way to dynamically load object files
|
||||
systems that provide an implementation of `dlopen()` (e.g. Linux/Sun), as
|
||||
well as Windows platforms via DLLs.
|
||||
|
||||
Do not call these functions from within global constructors (for example, those
|
||||
using GCC’s `__attribute__((constructor))` attribute) as this may lead to deadlock.
|
||||
|
||||
A program which wants to use these functions must be linked to the libraries
|
||||
output by the command:
|
||||
|
||||
|
@@ -59,6 +59,10 @@
|
||||
* The #GModule struct is an opaque data structure to represent a
|
||||
* [dynamically-loaded module](modules.html#dynamic-loading-of-modules).
|
||||
* It should only be accessed via the following functions.
|
||||
*
|
||||
* To ensure correct lock ordering, these functions must not be called from
|
||||
* global constructors (for example, those using GCC’s
|
||||
* `__attribute__((constructor))` attribute).
|
||||
*/
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user