|
From: | Philip Balister |
Subject: | Re: [Discuss-gnuradio] shmat issue |
Date: | Tue, 26 Oct 2010 10:40:45 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4 |
On 10/25/2010 07:36 PM, Joshua Lackey wrote:
Quoting Philip Balister (address@hidden):On Wed, Oct 20, 2010 at 01:02:15PM -0400, Philip Balister wrote:On 10/19/2010 10:51 PM, Eric Blossom wrote: OK, it looks like x86 sets SHMLBA to PAGE_SIZE and arm uses 4 * PAGE_SIZE. Need to puzzle through this a little more. This is the failing check in the kernel.OK. What's PAGE_SIZE on arm?PAGE_SIZE is still 4096, there is an additional restriction on the address passed to shmat().Is the additional restriction '4 * PAGE_SIZE'? If so, look in the circular_buffer.cc for kalibrate and change the line that reads: m_pagesize = getpagesize(); to m_pagesize = 4 * getpagesize(); It may be that easy. The rest of the logic should work.
Basically, yes. Unfortunately, this didn't work. I'll double check when I get back from ELCE. It seems like the shm code returns an address that is not valid for using as an address you pass to shmat :(
Alternatively, you can force the use of Posix shared memory and see if that works for kalibrate on your platform. (The easiest thing to do would be to look for D_HOST_OSX and make sure those #ifdef's are the ones that gets compiled.)
I'll check this when I get home.
Email me with your results and I'll add some code to make arm work in the next version of kal.
Thanks! Could we use the mmap code from gnuradio? That is what ends up being used there I think. I skimmed the shm code while working on this problem, and it looks like it used mmap internally :)
Philip
[Prev in Thread] | Current Thread | [Next in Thread] |