[ECOS] Question about HAL_IO_BARRIER() macro?

Qiang Huang jameshq@liverpool.ac.uk
Fri Sep 20 06:44:00 GMT 2002


Hi all:
     Does anyone know what is 

#define HAL_IO_BARRIER()       asm volatile ( "" : : : "memory" )

used for (Is this necessary?)?

When accessing the register value as following:

#define HAL_READ_UINT8( _register_, _value_ )           \
    CYG_MACRO_START                                     \
    ((_value_) = *((volatile CYG_BYTE *)(_register_))); \
    HAL_IO_BARRIER ();                                  \
    CYG_MACRO_END

how does HAL_IO_BARRIER() works here?

BTW what's the "memory" in HAL_IO_BARRIER stands for?

Thanks a lot.


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



More information about the Ecos-discuss mailing list