summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@digia.com>2012-06-13 11:47:40 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-28 13:13:45 (GMT)
commit2baea374eecc0d64dc5d69308bb1d446999d2898 (patch)
tree10cac1022a91f87aff3ad6582321681567e1007d /src/corelib/kernel
parent51404b0e979d0a971cace7e265638e6bec48f935 (diff)
downloadQt-2baea374eecc0d64dc5d69308bb1d446999d2898.zip
Qt-2baea374eecc0d64dc5d69308bb1d446999d2898.tar.gz
Qt-2baea374eecc0d64dc5d69308bb1d446999d2898.tar.bz2
Add support getting memory page size to RTP mode on VxWorks.
Change-Id: Id71bf7fd8e7371284076247558cba7edb0307e13 (cherry picked from qtbase/00faa09aadfc6c6db9da639ba6b7866c72447e39) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qfunctions_vxworks.cpp6
-rw-r--r--src/corelib/kernel/qfunctions_vxworks.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/kernel/qfunctions_vxworks.cpp b/src/corelib/kernel/qfunctions_vxworks.cpp
index 7e2516e..8d25ad6 100644
--- a/src/corelib/kernel/qfunctions_vxworks.cpp
+++ b/src/corelib/kernel/qfunctions_vxworks.cpp
@@ -46,7 +46,9 @@
#include "qplatformdefs.h"
#include "qfunctions_vxworks.h"
+#if defined(_WRS_KERNEL)
#include <vmLib.h>
+#endif
#include <selectLib.h>
#include <ioLib.h>
@@ -118,7 +120,11 @@ int gettimeofday(struct timeval *tv, void /*struct timezone*/ *)
// neither getpagesize() or sysconf(_SC_PAGESIZE) are available
int getpagesize()
{
+#if defined(_WRS_KERNEL)
return vmPageSizeGet();
+#else
+ return sysconf(_SC_PAGESIZE);
+#endif
}
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
diff --git a/src/corelib/kernel/qfunctions_vxworks.h b/src/corelib/kernel/qfunctions_vxworks.h
index 761c051..5ab12b4 100644
--- a/src/corelib/kernel/qfunctions_vxworks.h
+++ b/src/corelib/kernel/qfunctions_vxworks.h
@@ -152,7 +152,7 @@ int gettimeofday(struct timeval *, void *);
int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) __attribute__((weak));
#endif
-// neither getpagesize() or sysconf(_SC_PAGESIZE) are available
+// getpagesize() not available
int getpagesize();
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)