All in the title really, I have to maintain an old project with an old BIOS, it has a sem_pend in a util function that can be called from an SWI/HWI etc, I need to detect this and set the timeout to zero.
Chris
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
All in the title really, I have to maintain an old project with an old BIOS, it has a sem_pend in a util function that can be called from an SWI/HWI etc, I need to detect this and set the timeout to zero.
Chris
Chris,
I think this was one of the deficiencies of BIOS in v4.9. The only thing I can think of, if you don't care whether you are in a HWI or SWI, is that you can check your current stack pointer and compare it to the ISR stack. This would tell you if you are in a HWI or SWI since TSKs have their own stack.
Judah