Manual Pages for UNIX Darwin command on man OSMemoryBarrier
MyWebUniversity

Manual Pages for UNIX Darwin command on man OSMemoryBarrier

BARRIER(3) BSD Library Functions Manual BARRIER(3)

NAME

OOSSMMeemmoorryyBBaarrrriieerr - memory barrier to order loads and stores

LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

void OOSSMMeemmoorryyBBaarrrriieerr(void);

DESCRIPTION

OOSSMMeemmoorryyBBaarrrriieerr() strictly orders memory accesses in a weakly ordered memory model such as with PowerPC, by creating a barrier. All loads and

stores executed in sequential program order before the barrier will com-

plete with respect to the memory coherence mechanism, before any load or store executed after the barrier. Used with an atomic operation, the barrier can be used to create custom synchronization protocols as an alternative to the spinlock or queue/dequeue operations. Note that this barrier does not order uncached loads and stores. On a uniprocessor, the barrier operation is typically optimized into a nop.

SEE ALSO

atomic(3), atomicqueue(3), spinlock(3) Darwin May 26, 2004 Darwin




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™