Add support getting memory page size to RTP mode on VxWorks.

Change-Id: Id71bf7fd8e7371284076247558cba7edb0307e13
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Pasi Petäjäjärvi 2012-06-13 14:47:40 +03:00 committed by The Qt Project
parent 49b8e21429
commit 00faa09aad
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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)