This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cyg_interrupt_disable/enable question


On Sun, 2002-09-22 at 08:07, Nick Garnett wrote:
> Gary Thomas <gthomas@ecoscentric.com> writes:
> 
> > On Sat, 2002-09-21 at 12:03, andy.tenka@delphiauto.com wrote:
> > > 
> > > 
> > > One followup question:
> > > 
> > > Does cyg_disable_interrupt also mask the scheduler interrupt (ie, disables the
> > > scheduler)?
> > > Thanks.
> > > 
> > 
> > I also forgot to mention before - don't use "cyg_disable_interrupts()",
> > but rather HAL_DISABLE_INTERRUPTS().  The macros are designed to be 
> > portable and will be present, no matter the platform.  The functions
> > like "cyg_disable_interrupts()" are used by some platforms to perform
> > the operation, but are not guaranteed to exist [they aren't part of
> > the HAL API].  Use the HAL_xxx macros whenever possible.
> > 
> 
> I would say quite the reverse. Always use the kernel interface: either
> cyg_disable_interrupts(), cyg_drv_isr_lock(), or
> Cyg_Interrupt::disable_interrupts() rather that use the HAL API directly. The
> kernel interface has added semantics, and works in SMP systems where
> the HAL interface does not.

Agreed, sorry for confusing these.

> 
> Or did you mean functions like cyg_hal_disable_interrupts() that some
> HALs use to implement HAL_DISABLE_INTERRUPTS() ?

The latter.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]