summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@digia.com>2012-06-13 14:47:40 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-23 10:38:55 +0100
commit00faa09aadfc6c6db9da639ba6b7866c72447e39 (patch)
tree268eb6d448318dcf19830219b37fa1c557028198 /src
parent49b8e21429c7ab785fb11e8ef84bd7e65c943861 (diff)
Add support getting memory page size to RTP mode on VxWorks.
Change-Id: Id71bf7fd8e7371284076247558cba7edb0307e13 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src')
-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 49d9d51ac0..5ed2a62052 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 323d662ba1..67920d13cb 100644
--- a/src/corelib/kernel/qfunctions_vxworks.h
+++ b/src/corelib/kernel/qfunctions_vxworks.h
@@ -113,7 +113,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)