This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Question about HAL_IO_BARRIER() macro?
- From: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- To: "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 20 Sep 2002 14:30:16 +0100
- Subject: [ECOS] Question about HAL_IO_BARRIER() macro?
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