[Gambas-user] Shared WiringPi library for RasPi
CJ
lists at ...2828...
Sat May 25 20:54:27 CEST 2013
> What happens if there is no code at all inside the interrupt handler?
The same thing.
> Do you know in which context the interrupt handler is run? (signal
> handler context? Something else?)
Here is the response from wiringPi's author Gordon Henderson...
The interrupt handler is a standard pthread process. The wiringPiISR code
creates the thread and that thread then waits for the interrupt, then
calls the ISR function - so the function called has to be "thread safe" -
something I possibly ought to better document...
> And I don't understand why you get an error on line #110,
> whereas there is only 58 lines in your MMain.module file...
My bad! Reason to this is that I cleaned up the code before making the
tar-ball
below is the correct output for the attached code...
root at ...3122...:/home/Projekt/libwiringPi_irq# ./libwiringPi_irq.gambas
wiringPi Init OK...
IRQ setup OK...
Waiting....
Waiting....
Waiting....
Waiting....
Waiting....
MMain.Main.52: #3: Stack overflow
1: MMain.Main.52
And output from gdb...
...
(gdb) bt
#0 THROW (code=0) at gb_error.c:465
#1 0x0004a9e4 in THROW_STACK () at gb_error.c:489
#2 0x0004a9e4 in THROW_STACK () at gb_error.c:489
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
The stack overflow is happening on the "Wait 1" line in the Do...Loop and
same
thing happens if I remove the Wait and Print command in the Do...Loop.
/CJ
More information about the User
mailing list