4.10.4 mb
Keywords: onyx

Next: 4.10.5 mem Up: 4.10 Classes Previous: 4.10.3 dch Contents Index
Subsections

- 4.10.4.1 API

##
4.10.4 mb

The mb class implements memory barriers. A memory barrier is a low level construct that is sometimes useful for guaranteeing the order in which memory operations take place, even when multiple microprocessors are involved. In most cases, mutexes are the best choice for synchronizing data access, but sometimes it is convenient (and critical to performance) to use memory barriers where weaker access constraints are adequate.

### 4.10.4.1 API

void mb_write(void):

  Input(s):
    None.
  Output(s):
    None.
  Exception(s):
    None.
  Description:
    Create a write barrier, so that any memory writes done before the memory barrier are guaranteed to be visible by the time any memory writes after the memory barrier become visible.