Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

intLock() or intDisable() ?

306 views
Skip to first unread message

Docular Xu

unread,
Jul 30, 2001, 9:01:15 PM7/30/01
to
hi,
I'm a beginner in VxWorks.
When entering an ISR, I know the interrupt should be locked first. In
VxWorks' docs, there are no directions told me how to do this.
There are two functions which seem approporate to this task :
intLock() and intDisable(). Which one should be used?

Thanks, scincerely.

David Given

unread,
Jul 31, 2001, 6:46:37 AM7/31/01
to
In article <f2f01b49.01073...@posting.google.com>,

According to my understanding, ISRs always run in the processor's
interrupt mode with interrupts off. So you need take no explicit action to
block interrupts. (Unless your system supports nested interrupts, but even
then you would only need to explicitly call intLock() and intUnlock() if
you wanted to block anything with a higher priority.)

For reference: intLock() and intUnlock() block and unblock global
interrupts. All systems have these.

intDisable() and intEnable() block and unblock specific interrupt sources
in a platform-dependent manner. Not all systems have these. They allow you
to block, say, all interrupts with a priority less than 5 while allowing
others to be executed.

Which you use depends on the system you are running on and how portable
you want your code to be.

--
David Given
Tao Group Ltd.

0 new messages