diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@digia.com> | 2012-06-15 11:30:15 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-28 13:12:46 (GMT) |
commit | 18569440473e779759ecf0ca4582f81cbc59e916 (patch) | |
tree | 6b1e83c1bf6772acc26b456e52cb9a401d76d27b | |
parent | 8f468cae84a51975045eece9c62dc5901818f5f8 (diff) | |
download | Qt-18569440473e779759ecf0ca4582f81cbc59e916.zip Qt-18569440473e779759ecf0ca4582f81cbc59e916.tar.gz Qt-18569440473e779759ecf0ca4582f81cbc59e916.tar.bz2 |
Use taskIdSelf() function instead of taskIdCurrent global variable
The uniprocessor taskIdCurrent global variable (declared in taskLib.h)
does not exist in VxWorks SMP, because of concurrent execution on
multiple CPUs. Any uniprocessor code that reads taskIdCurrent should
make calls to taskIdSelf() instead.
Change-Id: I4e0efef32297f339d6121c7d4bca3820e0fc9294
(cherry picked from qtbase/608cd1ad84484448ac9b0b8b4d88e0e8ff4a9cf1)
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 4bdccf2..df3cda1 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -125,7 +125,7 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() } #elif defined(Q_OS_VXWORKS) char name[20]; - qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdCurrent)); + qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdSelf())); // make sure there is no pipe with this name pipeDevDelete(name, true); @@ -165,7 +165,7 @@ QEventDispatcherUNIXPrivate::~QEventDispatcherUNIXPrivate() close(thread_pipe[0]); char name[20]; - qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdCurrent)); + qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdSelf())); pipeDevDelete(name, true); #else |