Re: The idea of disabling interrupts
- From: Laguna <zeng.ed@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 00:14:25 -0800 (PST)
On Nov 29, 12: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
Please define share more precisely.
If only one thread is writing to data, and other thread(s) is reading
data only, then no need for the things you requested. Producer/
consumer buffers are typically implemented as such.
.
- 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
- The idea of disabling interrupts
- Prev by Date: Re: The idea of disabling interrupts
- Next by Date: Re: TCP/ IP, USB stacks and ThreadX
- Previous by thread: Re: The idea of disabling interrupts
- Next by thread: How to build RTOS kernal for ARM processor
- Index(es):
Relevant Pages
|