Skip to main content

Interrupt of Squawk follow up

2 replies [Last post]
fritschs
Offline
Joined: 2009-07-31
Points: 0

Hi all,

This question is related to the question that was already asked about Squawk interrupts. I could not find a class in the source code tree that realises a low-level interrupt handler (.i.e. the .c file that sets the interrupt bit). Is there a code example that shows how and where the low-level interrupt handler is called?

Thanks in advance,

Serena

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
derek_white
Offline
Joined: 2006-09-08
Points: 0

The actual interrupt functional called by the CPU is java-irq-hndl.s in vmcore/src/rts/gcc-9200.

It sets some state (what interrupt, when, etc), then tells the Java code to poll for an interrupt as soon as possible. Java code is not directly executed in the interrupt routine.

Basically the interrupt forces a thread reschdule at the next safe point, and part of thread scheduling polls the native code for low-level events, including interrupts:

VMThread.rescheduleNext() ->
VM.getEvent()
9200-io.c: ioExecute()
9200-io.c: getEvent()

jayce_nqq
Offline
Joined: 2009-06-18
Points: 0

Dear derek_white:
Can you give me a simple example about how to use the interrupt of Squawk? Thank you very much! My email is: niqinqin0113@163.com