swh:1:snp:673156c31a876c5b99b2fe3e89615529de9a3c44
Revision c28204066c2d3bae989132ab15e8df437ae38f3d authored by Thiago Macieira on 02 August 2012, 14:15:22 UTC, committed by Qt by Nokia on 25 August 2012, 08:35:26 UTC
Unlocking a mutex can never throw an exception. That doesn't make
sense and our code should make sure it can't happen. Right now,
provided that the system-level functions don't throw, we don't either.

Locking a mutex cannot throw on Linux because we use futexes
directly. A non-recursive mutex is just a futex, whereas a recursive
mutex uses a mutex (a futex) to manage a lock count.

However, on other platforms, due to the freelist, there can be memory
allocation, which means it might throw std::bad_alloc. Not because of
the freelist itself (that uses malloc and will just crash if malloc
fails) but because of Q_GLOBAL_STATIC. In 5.1, the global static will
be noexcept provided the type's constructor is so too (it is, in this
case).

Change-Id: I4c562383f48de1be7827b9afb512d73eaf0792d5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
1 parent 98437f0
History
Tip revision: ed928cee1233aee003610d5fadb56bdaeffbd7b2 authored by Jake Petroules on 22 September 2016, 17:55:20 UTC
Suppress deprecated warnings for some QSysInfo members
Tip revision: ed928ce
File Mode Size
bin
config.tests
dist
doc
examples
lib
mkspecs
qmake
src
tests
tools
util
.gitattributes -rw-r--r-- 11 bytes
.gitignore -rw-r--r-- 7.5 KB
.tag -rw-r--r-- 5 bytes
INSTALL -rw-r--r-- 663 bytes
LGPL_EXCEPTION.txt -rw-r--r-- 1.2 KB
LICENSE.FDL -rw-r--r-- 22.4 KB
LICENSE.GPL -rw-r--r-- 34.3 KB
LICENSE.LGPL -rw-r--r-- 26.2 KB
LICENSE.PREVIEW.COMMERCIAL -rw-r--r-- 30.8 KB
configure -rwxr-xr-x 204.8 KB
configure.bat -rw-r--r-- 3.7 KB
header.BSD -rw-r--r-- 2.0 KB
header.FDL -rw-r--r-- 830 bytes
header.LGPL -rw-r--r-- 1.6 KB
header.LGPL-ONLY -rw-r--r-- 961 bytes
qtbase.pro -rw-r--r-- 4.1 KB
sync.profile -rw-r--r-- 7.4 KB

back to top