Make taking a global lock automatically initialize locking if needed
This lets them be thread-safe by default, at the cost that they can
now fail.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Anas Nashif <anas.nashif@intel.com>
Applied-upstream: 1.7.6, commit:
2b3272c75ae48c93911bd6f656965cf77d6de3e8
Bug-Tizen: TZPC-1971
Change-Id: I7e547e5776d37051ec8b6eccc2c8bd34b8d1996b