Hi Champ,
I'm sorry, but I'm beginner at SYS/BIOS v6. So, I'd like to know about the mentioned in subject.
Can I call Semaphore_pend() function in SWI?
Thanks in advance for your cooperation.
Best regards,
j-breeze
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.
Hi Champ,
I'm sorry, but I'm beginner at SYS/BIOS v6. So, I'd like to know about the mentioned in subject.
Can I call Semaphore_pend() function in SWI?
Thanks in advance for your cooperation.
Best regards,
j-breeze
Hi j-breeze,
My understanding is, Semaphore_pend() may not be called in SWI.
Please refer the section 3.2.3 (A Comparison of Thread Characteristics) of http://www.ti.com/lit/ug/spruex3l/spruex3l.pdf.
The table says SWI needs to "run to completion except for preemption."
Regards,
Atsushi
Hi Atsushi San,
Thank for your prompt reply. I got it.
I really appriciate your kindly support for beginners like me.
Best regards,
j-breeze
j-breeze,
One thing to add… while it is not common to do it, it is possible to call Semaphore_pend() from a Swi *if* the timeout value is zero. This allows “polling” of the semaphore value without blocking execution of the calling thread.
For each SYS/BIOS module there is a calling context table in the “cdoc” documentation that comes with each release. For example, for the Semaphore module:
These tables are very useful for clarifying which calling contexts are allowed or restricted.
Scott