Re: The idea of disabling interrupts
- From: karthikbalaguru <karthikbalaguru79@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 00:13:32 -0800 (PST)
On Nov 30, 10:11 am, Ed Prochak <edproc...@xxxxxxxxx> wrote:
On Nov 29, 3:42 am, karthikbalaguru <karthikbalagur...@xxxxxxxxx>
wrote:
On Nov 29, 12:21 pm, Arlet Ottens <usene...@xxxxxxxxxxxxxxxxx> wrote:
karthikbalaguru wrote:
Is it a good idea to disable interrupts while sharing data (Critical
Sections) ?
If you're sharing your data with an ISR, it is often the only thing you
can do (unless your CPU has the right atomic instructions for the job).
Thx for highlighting this :):)
If you're sharing between two tasks, it depends. Generally, if you
disable interrupts for a short period, and you don't call any OS/library
functions, it can be a useful method. Exactly how long you can disable
interrupts depends on your environment and real-time requirements.
Thx for the info. Interesting :):)
Thinking over this, i have a query -
Is it possible to do sharing of data(Critcal Section) wihtout diabling
of interrupts and also
without the use of these RTOS features like semaphore/Mutex/
MessageQueues/Pipes/Mailboxes ?
Thx in advans,
Karthik Balaguru
If you have an OS that supports MessageQueues/Pipes/Mailboxes, why do
you want to avoid them?
And if you have an OS that supports semaphore/Mutex, why would you
want to avoid using them?
Semaphores were created for dealing with critical section issues.why
not use the right tool for the job?
I was just thinking of a way of avoiding
the disabling of interrupts by our own programming
rather than depending on the RTOS features.
Karthik Balaguru
.
- References:
- The idea of disabling interrupts
- From: karthikbalaguru
- Re: The idea of disabling interrupts
- From: Arlet Ottens
- Re: The idea of disabling interrupts
- From: karthikbalaguru
- Re: The idea of disabling interrupts
- From: Ed Prochak
- The idea of disabling interrupts
- Prev by Date: Re: The idea of disabling interrupts
- Next by Date: Re: The idea of disabling interrupts
- Previous by thread: Re: The idea of disabling interrupts
- Next by thread: Re: The idea of disabling interrupts
- Index(es):
Relevant Pages
|