[ECOS] Atomic operations

Jonathan Larmour jlarmour@redhat.co.uk
Tue Aug 8 08:29:00 GMT 2000


"Boris V. Guzhov" wrote:
> >
> >If you do need to go faster, you can try disabling and enabling
> >interrupts using cyg_interrupt_disable() and cyg_interrupt_enable().
> >Since there are only a few instructions involved for code like this,
> >it is unlikely that the maximum interrupt latency will be affected.
> >
> >Alternatively there might be some x86 instructions which will do the
> >right thing without having to disable interrupts, and which you could
> >invoke using some inline assembler. It has been quite a while since I
> >did any x86 assembler programming, I cannot help there.
>
> Thanks.
> I think that the instructions of the CPU interrupts disabling/enabling are
> available in many CPUs.
> And it's useful to have  HAL macros's for them.

I think the HAL_ENABLE/DISABLE/RESTORE_INTERRUPTS macros in
hal/i386/pc/VERSION/include/var_intr.h are what you are probably looking
for here.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault


More information about the Ecos-discuss mailing list