FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Dobbs M-Dev
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
April 01, 2003

Memory Consistency & .NET

(Page 2 of 10)
Apr03: Memory Consistency & .NET


(a)
// Assume R==0 on entry
// Fill message buffer
for( int i=0; i<n; i++)
   M[i] = ...;
// Signal that message is ready.
R = 1;

(b)
// Assume R==0 on entry
// Wait for signal from sender
while( R==0 )
   continue
// Read the message
for( int i=0; i<n; i++ )
    ... = M[i];

Example 1: (a) Code for sending a message; (b) code for receiving a message. Code assumes sequential consistency.

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK