summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@digia.com>2012-06-15 14:30:15 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-23 10:38:49 +0100
commit608cd1ad84484448ac9b0b8b4d88e0e8ff4a9cf1 (patch)
tree5c573d4971ab9af1f747c724416eb0df0ef4a409 /src/corelib
parentbaad50e97946c4b99998f215aa5c023c17be29ea (diff)
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 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index 6408147567..b22260a420 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -113,7 +113,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);
@@ -159,7 +159,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