Problems with pistachio

Ashford Nichols <[email protected]> Fri, 3 Jun 2011 09:01:09 -0700
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
--000e0cd2e352aa866f04a4d0dc62
Content-Type: text/plain; charset=ISO-8859-1

I have fixed the second problem but I would still like to have the answers
for the other two. I have modified the interrupt handling code so it is
easier to understand. The modified version of the code (with the exact same
problem) looks like this:

#include <l4io.h>
#include <l4/ipc.h>
#include <l4/schedule.h>
#include <l4/thread.h>

int main(int argc, char** argv){
printf("application started\n");
L4_ThreadId_t root = L4_MyGlobalId();
L4_ThreadId_t irq1 = L4_GlobalId(1, 1); // keyboard interrupt
L4_AssociateInterrupt(irq1, root);
while(1){
L4_Receive(irq1);
printf("interrupt received\n");
L4_LoadMR(0, 0);
L4_Reply(irq1);
}
return 0;
}

So can anyone tell me why this piece of code does not acknowledge the
interrupt?

Ashford

--000e0cd2e352aa866f04a4d0dc62
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I have fixed the second problem but I would still like to have the answers =
for the other two. I have modified the interrupt handling code so it is eas=
ier to understand. The modified version of the code (with the exact same pr=
oblem) looks like this:<div>
<br></div><div><div>#include &lt;l4io.h&gt;</div><div>#include &lt;l4/ipc.h=
&gt;</div><div>#include &lt;l4/schedule.h&gt;</div><div>#include &lt;l4/thr=
ead.h&gt;</div><div><br></div><div>int main(int argc, char** argv){</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>print=
f(&quot;application started\n&quot;);</div><div><span class=3D"Apple-tab-sp=
an" style=3D"white-space:pre">	</span>L4_ThreadId_t root =3D L4_MyGlobalId(=
);</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>L4_Th=
readId_t irq1 =3D L4_GlobalId(1, 1); // keyboard interrupt</div><div><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>L4_AssociateInte=
rrupt(irq1, root);</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>while=
(1){</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		<=
/span>L4_Receive(irq1);</div><div><span class=3D"Apple-tab-span" style=3D"w=
hite-space:pre">		</span>printf(&quot;interrupt received\n&quot;);</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>L4_L=
oadMR(0, 0);</div><div><span class=3D"Apple-tab-span" style=3D"white-space:=
pre">		</span>L4_Reply(irq1);</div><div><span class=3D"Apple-tab-span" styl=
e=3D"white-space:pre">	</span>}</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>retur=
n 0;</div><div>}</div></div><div><br></div><div>So can anyone tell me why t=
his piece of code does not acknowledge the interrupt?</div><div><br></div><=
div>
Ashford</div>

--000e0cd2e352aa866f04a4d0dc62--