void
membar_enter(
void
)
void
membar_exit(
void
)
void
membar_producer(
void
)
void
membar_consumer(
void
)
void
membar_sync(
void
)
)
Any store preceeding
membar_enter()
will reach global visibility before all loads and stores following it.
membar_enter()
is typically used in code that implements locking primitives to ensure
that a lock protects its data.
)
All loads and stores preceding
membar_exit()
will reach global visibility before any store that follows it.
membar_exit()
is typically used in code that implements locking primitives to ensure
that a lock protects its data.
)All stores preceding the memory barrier will reach global visibility before any stores after the memory barrier reach global visibility.
)All loads preceding the memory barrier will complete before any loads after the memory barrier complete.
)All loads and stores preceding the memory barrier will complete and reach global visibility before any loads and stores after the memory barrier complete and reach global visibility.