From 608cd1ad84484448ac9b0b8b4d88e0e8ff4a9cf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Fri, 15 Jun 2012 14:30:15 +0300 Subject: [PATCH] Use taskIdSelf() function instead of taskIdCurrent global variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/corelib/kernel/qeventdispatcher_unix.cpp | 4 ++-- 1 file 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