summaryrefslogtreecommitdiff
path: root/src/corelib/kernel/qsharedmemory.cpp
diff options
context:
space:
mode:
authorRitt Konstantin <qnx@ics.com>2011-06-21 13:51:08 +0200
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-21 14:05:42 +0200
commitd869e1ad4b0007757e97046609de2097cd9e9c5d (patch)
tree5ff57ff14b0c7cf55c74ac91c9eefc9631e482b9 /src/corelib/kernel/qsharedmemory.cpp
parent6ef4abaa9cd7d465cbae5cbf8cb4664bef387d10 (diff)
downloadqt4-tools-d869e1ad4b0007757e97046609de2097cd9e9c5d.tar.gz
implement POSIX IPC based QSystemSemaphore and QSharedMemory backends
Merge-request: 1259 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qsharedmemory.cpp')
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 288227933c..371974cae9 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -80,6 +80,8 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
return result;
#elif defined(Q_OS_SYMBIAN)
return result.left(KMaxKernelName);
+#elif defined(QT_POSIX_IPC)
+ return QLatin1Char('/') + result;
#else
return QDir::tempPath() + QLatin1Char('/') + result;
#endif
@@ -117,6 +119,9 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
process crashes without running the QSharedMemory destructor, the
shared memory segment survives the crash.
+ \o QNX: Due to possible race conditions in the POSIX IPC implementation, create()
+ should be called prior to any attach() calls (even across multiple threads).
+
\o HP-UX: Only one attach to a shared memory segment is allowed per
process. This means that QSharedMemory should not be used across
multiple threads in the same process in HP-UX.