summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-22/+22
| | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-7/+7
| | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Modernize the "thread" featureUlf Hermann2018-08-171-4/+0
| | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* doc: Correct remaining qdoc warnings in qmutex.cppMartin Smith2018-01-041-2/+2
| | | | | | | | clang required adding template clauses to a few \fn commands. || defined(Q_CLANG_QDOC) was also added in qmutex.h. Change-Id: I7e61f460a8f8f15032094fb35c02f73721a5eb8a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix typo in QMutex's free-list's Sizes[3]Edward Welbourne2017-06-081-1/+1
| | | | | | | | | | | A QFreeList's MaxIndex is clearly meant to be the sum of its Sizes; but the parentheses in MaxIndex - (16 - 128 - 1024) doesn't give the same as without the parentheses. Noticed while reviewing a copy of this code now used by QReadWriteLock (which has this fix). Change-Id: I9f68171475b3c6edc18896056b5532183fee92b2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-081-0/+3
|\ | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * Doc: corrected minor link issuesNico Vertriest2017-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | qcore_foundation.mm: - Can't link to 'fromCGPoint()' - Undocumented parameter 'point' in QPointF::fromCGPoint() - Can't link to 'fromCGRect()' - Undocumented parameter 'rect' in QRectF::fromCGRect() - Can't link to 'fromCGSize()' - Undocumented parameter 'size' in QSizeF::fromCGSize() Change-Id: Ie48f04c7b990634f8c5a836100b1be7854848bb4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | doc: clangqdoc documents the threads caseMartin Smith2017-01-061-2/+12
|/ | | | | | | | | | qmutex.h is updated to let clangqdoc document the threads case, because the no-threads case is not interesting, and clang can handle everything declared in qmutex.h. This change required that a few minor qdoc errors be corrected in qmutex.cpp as well. Change-Id: Icb4122f2179d6aad39dc68376498364820143297 Reviewed-by: Martin Smith <martin.smith@qt.io>
* QMutex: small doc fixesMarc Mutz2016-11-291-2/+2
| | | | | | | | Add parentheses after function names, replace is different -> differs Change-Id: I6332db1d1650ed8d8320c5f20cd79d0bf1870e27 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QMutex: make sure we try_lock_for no shorter than the duration passedMarc Mutz2016-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By templating on the <chrono> types and unconditionally using duration_cast to coerce the duration into a milliseconds, we allowed code such as mutex.try_lock_for(10us) to compile, which is misleading, since it's actually a zero- timeout try_lock(). Feedback from the std-discussions mailing list is that the wait_for functions should wait for _at least_ the duration given, because that is the natural direction of variance (tasks becoming ready to run might not get a CPU immediately, causing delays), while an interface that documents to wait _no more_ than the given duration is promising something it cannot fulfill. Fix by converting the given duration to the smallest number of milliseconds not less than the original duration. If that is not representable in an int, use INT_MAX, emulating the effect of a spurious wakeup, which are allowed to happen if the function returns false in that case. In the above example, the try_lock_for call is now equivalent to mutex.tryLock(1); The tryLock() docs state that the actual waiting time does not exceed the given milliseconds, but fixing that is a separate issue. Change-Id: Id4cbbea0ecc6fd2f94bb5aef28a1658be3728e52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace custom type traits with std one'sKai Koehne2016-11-081-2/+1
| | | | | | | | | | | | | | | | | | Remove most type traits from qtypetraits.h, but keep the custom implementation of is_signed/is_unsigned. This gets rid of BSD-3 licensed code from Google in a public header (hugh!). The custom implementations for is_signed/is_unsigned are kept because the implementations in gcc's standard headers do not work as we expect for enums - both is_signed and is_unsigned always returns false there - see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027 [ChangeLog][QtCore][General] Qt now relies on type traits from the C++ standard library. Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-291-25/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a were reverted because of reconstruction in 5.7. defineTest(qtConfTest_checkCompiler) in configure.pri is smart enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5. DirectWrite: Fix advances being scaled to 0 Since 131eee5cd, the stretch of a font can be 0, meaning "whatever the font provides". In combination with ec7fee96, this would cause advances in the DirectWrite engine to be scaled to 0, causing the QRawFont test to fail. Conflicts: configure mkspecs/features/uikit/device_destinations.sh mkspecs/features/uikit/xcodebuild.mk src/corelib/global/qglobal.cpp src/corelib/global/qnamespace.qdoc src/plugins/platforms/cocoa/qcocoamenuitem.h src/plugins/platforms/windows/qwindowsservices.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp src/widgets/kernel/qapplication.cpp tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-251-25/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/mimetypes/qmimeprovider.cpp src/corelib/mimetypes/qmimetype.cpp Change-Id: Ib483ddb6bfc380e7c8f195feca535703814c3872
| | * QMutex: Make freelist() return a real global staticRaphael Kubo da Costa2016-08-231-25/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.6.0, some applications such as Kate (built with clang, libc++ and libcxxrt) on FreeBSD occasionally crash with the following error message on exit: QMutex::lock(): sem_wait failure: Invalid argument [or pthread_cond_wait in the 5.6 branch] Investigation by Gleb Popov, Thiago Macieira and Olivier Goffart has shown that this is caused by the fact that QDBusConnectionManager is a Q_GLOBAL_STATIC (so it will be destroyed with all the other Q_GLOBAL_STATICs in the reverse order of construction). In the Q_COMPILER_THREADSAFE_STATICS case, freelist() also returns a function-level static that is constructed on first use, so it may be destroyed earlier than the QDBusConnectionManager object, making it impossible to lock a contended mutex. We now make freelist() return a global static, so that it is always destroyed after QDBusConnectionManager and other function-static variables. Change-Id: I210fa7c18dbdf2345863da49141b9a85cffdef52 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Q(Basic)Mutex: add try_lock{,_for,_until} for STL compatibilityGiuseppe D'Angelo2016-07-251-0/+55
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Now QBasicMutex is Lockable and QMutex is TimedLockable, which means they can be used in std::lock_guard, std::unique_lock, std::lock, etc. [ChangeLog][QtCore][QMutex] QMutex now fully models the TimedLockable concept by providing the try_lock, try_lock_for and try_lock_until functions, therefore making it usable in Standard Library lock management classes and functions. Change-Id: I7c691481a5781a696701e1ab78186b5cefbd6a87 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add a QMutex::isRecursive() const noexceptThiago Macieira2016-05-091-5/+8
| | | | | | | | | | | | | | | | | | | | | | This is source- and binary-compatible, including the marking of the existing function as noexcept. [ChangeLog][QtCore][QMutex] Made the isRecursive() method be a const function so that it can be called in const QMutex objects too. Change-Id: Ifea6e497f11a461db432ffff1448bead97c08f92 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Update the Intel copyright yearThiago Macieira2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | Not that we require it, but since The Qt Company did it for all files they have copyright, even if they haven't touched the file in years (especially not in 2016), I'm doing the same. Change-Id: I7a9e11d7b64a4cc78e24ffff142b4c9d53039846 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Document performance of QMutexOlivier Goffart2015-11-131-0/+7
| | | | | Change-Id: I4de2fd5ba717975b5de98ffe7ca6348afbed1b2f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Free the QFreeList object allocated memory on exitjian liang2015-09-221-4/+11
| | | | | | | | | | | | | This memory allocation was introduced in 314c83c0c2f91532654f869b7dc6af1b7e8538da. With a compiler without thread safe statics support mutex.cpp use a function named freelist() to create the global QFreeList object. it will be created when the first time it was accessed, but will never be released. This patch use Q_DESTRUCTOR_FUNCTION to delete this object. Task-number: QTBUG-48359 Change-Id: I4e4716930930aa98630101a1f96de6a7672af9cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not use Q_GLOBAL_STATIC in the implementation of QMutexOlivier Goffart2015-08-131-1/+22
| | | | | | | | | | Since Q_GLOBAL_STATIC might use QMutex and cause a stack overflow. Task-number: QTBUG-47554 Change-Id: I4853c5e9b9168d4a417200e2a45a1bf9cb103a30 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix QMutex documentation saying some function are static while they are notOlivier Goffart2014-06-261-1/+1
| | | | | | | | | | | | | qdoc only see a fake QMutex class (the same as the one built in bootstrap) But that fake QMutex had static member while the normal QMutex class has non static member. QMutexLocker::mutex is also a const function in the real QMutexLocker Task-number: QTBUG-38522 Change-Id: I220434ffc6a9e990029f770e2536ecb55b4e2182 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Use the new 3-operand testAndSet functions in QMutexThiago Macieira2014-04-051-6/+6
| | | | | | | | | This allows us to get the current value of the QMutex / QBasicMutex after the testAndSet operation failed. It saves an extra load from memory. Change-Id: I4922a8b3df15e342b177b13f56cf4f1184314520 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-3/+3
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QMutex: fix race on 'owner' in the recursive caseMarc Mutz2013-09-211-4/+11
| | | | | | | | | | | The read from 'owner' for comparison with 'self' in QRecursiveMutexPrivate::lock() is not synchronized with the write to 'owner' in the same function further down, and neither operation is atomic. Fix by making 'owner' an atomic pointer. Change-Id: I186b88575589da0dce5827a1e17ceb4ce599ed02 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove use of 'register' from Qt.Stephen Kelly2013-06-171-1/+1
| | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix possible race in QMutexOlivier Goffart2013-04-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the QTBUG-30872, there may be a race condition involving 3 threads fighting for a mutex. I am surprised it was not caught before despite all the Q_ASSERT and the stress test in tst_qmutex. We do not need to call store(0) because the unlocking thread will eventually remove the BigNumber flag. And perhaps it even did it already, and another thread has incremented waiters (hence the Q_ASSERT is wrong) Here is a paste of part of the description from the bug report: --- many threads, one of them is ready to release mutex, while at least two other trying to acquire it d->waiters is 0 Thread 1 release mutex in unlockInternal: if (d->waiters.fetchAndAddRelease(-QMutexPrivate::BigNumber) == 0) d->waiters is now -QMutexPrivate::BigNumber Thread 2 try to acquire mutex in lockInternal: old_waiters = d->waiters.load(); if (old_waiters == -QMutexPrivate::BigNumber) { if (d_ptr.testAndSetAcquire(d, dummyLocked())) { It acquire 'about to release mutex' by changing d to dummyLocked Thread 1 continue release procedure: d->derefWaiters(0); d->waiters is now back to 0 Thread 3 try to acquire mutex in lockInternal: while (!d->waiters.testAndSetRelaxed(old_waiters, old_waiters + 1)); d->waiters is now 1 Thread 2 continue its dummy lock: d->waiters.store(0); d->waiters is force to 0 Thread 3 continue wait procedure but it realize that mutex was already unlocked so decrease back waiters if (d != d_ptr.loadAcquire()) { if (old_waiters != QMutexPrivate::BigNumber) { d->waiters.deref(); d->waiters became negative value of -1 Neither thread need internal data so it is released back to pool The waiters counter in released internal structure is still -1 --- Change-Id: I1b22555db764482775db6e64a8c9ffa9e1ab0cf6 Task-number: QTBUG-30872 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix some typosSergio Ahumada2012-12-211-2/+2
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Review of documentation.Michele Caini2012-10-131-2/+10
| | | | | | | | Documentation has been updated, changes apply to Qt5 as well as Qt4. Change-Id: I562914a439d8d27dc9e6b1aa117007edce214cc6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Add comments to document the internals of QMutexOlivier Goffart2012-09-211-2/+47
| | | | | Change-Id: Ieb5632017e5e8e09a11dc6b929efa19b4f350086 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QRecursiveMutexPrivate to qmutex.cpp and mark inlineThiago Macieira2012-09-141-2/+15
| | | | | | | | | | | | | | | | | Disassembly of the optimised code shows that the compiler was already inlining the bodies of one or both functions (since they're in the same .cpp, it's allowed to do that). However, since there was no "inline" marker, the compiler was also emitting an out-of-line copy, which wasn't used by anyone, as the class is not exported. So add the marker. To make sure that they don't get used by accident elsewhere, the class is moved to the .cpp file too. Change-Id: Iead578ec9c7d8dd6b4e6bb582ce5b829cdec5992 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* #include the qmutex_xxx.cpp at the end of qmutex.cppThiago Macieira2012-09-141-1/+10
| | | | | | | | This produces slightly better inlining results. Change-Id: Ie86471577f888cb2d9c9989306ec69ce0a296108 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Split the timed mutex lock from the non-timed lock functionsThiago Macieira2012-09-141-0/+8
| | | | | | | | | Non-timed mutex locks are by far more common, so let's try not to penalise the locking of those with code that won't get used that often. Change-Id: I37f56d6429836467fdec2e588c0fb22d914b5d75 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QBasicMutex be exclusively non-recursiveThiago Macieira2012-09-141-20/+40
| | | | | | | | | | | | | | | Dispatch to the recursive mutex functions from QMutex::lock, tryLock and unlock. This has the benefit that those using QBasicMutex will not go through the testing for recursive mutexes. It simplifies a little the code for those users. For the users of QMutex, the code required to perform a lock does not appear to change. Change-Id: I0ca9965e012b283c30f1fab8e9f6d9b3288c2247 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Hoist the recursive mutex check out of the inner loopThiago Macieira2012-09-141-3/+9
| | | | | | | | A non-recursive mutex doesn't suddenly become recursive, so we don't need to check it multiple times. Change-Id: Id040254b6142d320a7bd3111491082ad09968404 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Small optimisation to recursive mutexesThiago Macieira2012-08-261-2/+2
| | | | | | | | | | | A recursive mutex operates on top of a non-recursive mutex. Therefore, we can bypass the test for recursive. The end result is simply that the compiler can inline the locking and unlocking a little better inside the lock() and unlock() functions Change-Id: Ic06d1344ccd411c22cbdef74536f3a4d368d75d7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Mark mutex locking and unlocking functions with noexceptThiago Macieira2012-08-251-9/+9
| | | | | | | | | | | | | | | | | | | | | 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>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+3
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix some spelling errorsSergio Ahumada2012-07-111-4/+4
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QMutex: de-inline lock(), unlock(), and tryLock()Bradley T. Hughes2012-05-291-1/+12
| | | | | | | | | | | | | | See the discussion of this topic on the mailing list: http://lists.qt-project.org/pipermail/development/2012-May/003943.html The consensus is to not have these methods have inline code to actually acquire the lock (i.e. no atomic test-and-set or similar). QBasicMutex is unchanged, and continues to have inlined lock(), tryLock(), and unlock(). QMutexLocker has been changed to always call QMutex::lock() (even though the constructor takes a QBasicMutex parameter). Change-Id: Ic7d2d9d581e6b254c84fdfdd8ce6c425535a8078 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-34/+8
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Rename Q_MUTEX_LINUX to QT_LINUX_FUTEXHarald Fernengel2012-02-211-3/+3
| | | | | | | As requested by Thiago Change-Id: Ie5b00cf4e530e19d360d0bc588f0f051e04b338f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use standard unix mutexes on LSBHarald Fernengel2012-02-201-3/+3
| | | | | | | | LSB doesn't allow syscalls, so fall back to the normal _unix implementation Change-Id: I8aba6147da8b46e3f85b0454cf9aca219811c9fe Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>