QNX 6 mem_offset64() to QNX 4?

Hello, I’m hoping someone can help me convert the following from QNX 6 back
to QNX 4.

I’m trying to reach the physical memory address to use as a DMA buffer for a
video capture card. In QNX 6, I’ve found the following code that works,
however, I’m not finding mem_offset64 or similar in QNX4.

typedef long off64_t;

paddr_t mphys(void * addr)
{
off64_t offset;
if (mem_offset64(addr, NOFD, 1, &offset, 0)==-1)
return -1;
return offset;
}

I’m hoping someone could convert the above for me, or gimmie some hints.

Thanks!
Jack Harmon

Jack Harmon <me@work.com> wrote:

Hello, I’m hoping someone can help me convert the following from QNX 6 back
to QNX 4.

Take a look at the readme file:

/etc/readme/technotes/shmem.txt

The allocaton of physically contiguous memory under QNX4 was not done
as a special mmap() call (as under QNX6), but through
qnx_segment_alloc_flags(), and that tech note talks about setting up
DMA safe memory, and getting it’s physical address.

-David

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com

Thanks for the info! Will give it a shot!

Jack Harmon


“David Gibbs” <dagibbs@qnx.com> wrote in message
news:caktc3$fm2$3@inn.qnx.com

Jack Harmon <> me@work.com> > wrote:
Hello, I’m hoping someone can help me convert the following from QNX 6
back
to QNX 4.

Take a look at the readme file:

/etc/readme/technotes/shmem.txt

The allocaton of physically contiguous memory under QNX4 was not done
as a special mmap() call (as under QNX6), but through
qnx_segment_alloc_flags(), and that tech note talks about setting up
DMA safe memory, and getting it’s physical address.

-David

Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com