qnx_hint_attach Thank You! and one mor question

Thanks All of you for your help.
I have tracked my problem down but I’m not sure I understand why it
fails.

I have a situation with a main source file main.c, a souce file
containing access fuctions to a PC104 card in my stack cardfunct.c,
and a seperate isr source file isr.c.

Main.c initializes my card creates a proxy, and hooks the int#, and
handles proxy messages.
Cardfunct.c functions allow me to configure my card as well as clear
an interrupt generated by the card (just an inp(address) function).
Isr.c only calls a function from cardfunct.c to clear the interrupt
and then returns a proxy message.

The only file that is compiled with stack checking disabled is
isr.c. Whe I run the process after this compilation the machine locks
completely requiring hard reboot. If instead I comment out the
function call to cardfunct.c inside the isr and just put the inline
code (inp(address)), compile and execute it all works fine. It seems
to be an issue calling an outside function from inside the ISR. Could
someone please explain…

Thansk for your time and help

Regards,

Erick

<QNXNewbie@nomail.com> wrote in message
news:3da70fe3.185961187@inn.qnx.com

Thanks All of you for your help.
I have tracked my problem down but I’m not sure I understand why it
fails.

I have a situation with a main source file main.c, a souce file
containing access fuctions to a PC104 card in my stack cardfunct.c,
and a seperate isr source file isr.c.

Main.c initializes my card creates a proxy, and hooks the int#, and
handles proxy messages.
Cardfunct.c functions allow me to configure my card as well as clear
an interrupt generated by the card (just an inp(address) function).
Isr.c only calls a function from cardfunct.c to clear the interrupt
and then returns a proxy message.

The only file that is compiled with stack checking disabled is
isr.c. Whe I run the process after this compilation the machine locks
completely requiring hard reboot. If instead I comment out the
function call to cardfunct.c inside the isr and just put the inline
code (inp(address)), compile and execute it all works fine. It seems
to be an issue calling an outside function from inside the ISR. Could
someone please explain…

As said earlier, the function in cardfunct.c needs to be compile with stack
checking disable. Any fonction called by ISR MUST have the stack checking
disable. In the ISR the stack is the kernel’s stack, but stack checking
function assumes it’s the program’s stack :wink:

Thansk for your time and help

Regards,

Erick

As said earlier, the function in cardfunct.c needs to be compile with stack
checking disable. Any fonction called by ISR MUST have the stack checking
disable. In the ISR the stack is the kernel’s stack, but stack checking
function assumes it’s the program’s stack > :wink:

So is the stack your refering to a software stack maintianed by the OS
or the real Hardware stack that the processor keeps track of?

Thanks again all & Mario

Erick

<QNXNewbie@nomail.com> wrote in message
news:3da7357d.195587171@inn.qnx.com

As said earlier, the function in cardfunct.c needs to be compile with
stack
checking disable. Any fonction called by ISR MUST have the stack
checking
disable. In the ISR the stack is the kernel’s stack, but stack checking
function assumes it’s the program’s stack > :wink:

So is the stack your refering to a software stack maintianed by the OS
or the real Hardware stack that the processor keeps track of?

There is no such thing as software stack. Stack are always handle by
processor stack register. However the OS assign each processes theres own
memory space for the stack, and the kernel gets one to. The processor
register is set to corresponding process segment:offset every context
switch.

Thanks again all & Mario

Erick