Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - mphys under Linux development environment: (3 Items)
   
mphys under Linux development environment  
Under Production Linux QNX641, using #include <sys/mman.h>, and calling mphys(some_virtual_addr), I get the following 
error:
some_file.cpp:1063: error: 'mphys' was not declared in this scope
Under production Linux QNX632, I get 'implicit declaration of int mphys(' 

This does not occur under the Windows dev environment under 632 or 641.


Re: mphys under Linux development environment  
On Sun, 2010-01-10 at 13:01 -0500, Todd Peterson wrote:
> Under Production Linux QNX641, using #include <sys/mman.h>, and calling mphys(some_virtual_addr), I get the following 
error:
> some_file.cpp:1063: error: 'mphys' was not declared in this scope
> Under production Linux QNX632, I get 'implicit declaration of int mphys(' 
> 
> This does not occur under the Windows dev environment under 632 or 641.

I am now reliably informed that mphys() is actually a deprecated
interface; applications should be using mem_offset() and/or
mem_offset64() instead.
Re: mphys under Linux development environment  
On Sun, 2010-01-10 at 13:01 -0500, Todd Peterson wrote:
> Under Production Linux QNX641, using #include <sys/mman.h>, and calling mphys(some_virtual_addr), I get the following 
error:
> some_file.cpp:1063: error: 'mphys' was not declared in this scope
> Under production Linux QNX632, I get 'implicit declaration of int mphys(' 
> 
> This does not occur under the Windows dev environment under 632 or 641.

Looks like the prototype is missing altogether.  I've raised PR 73826 to
fix this in 642.  For earlier releases the workaround is to use:

        extern paddr_t mphys(void *);

Regards,
Neil