Mercurial > projects > dstress
annotate run/v/volatile_02_C.d @ 1489:b8c0195059d9
changed nntp: URLs to http: URLs
author | thomask |
---|---|
date | Mon, 09 Apr 2007 13:47:01 +0000 |
parents | 9b2038d153c2 |
children | 20d8ee6523e1 |
rev | line source |
---|---|
764 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Sean Kelly <sean@f4.ca> | |
6 // @date@ 2005-12-02 | |
1489 | 7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5726 |
764 | 8 |
9 module dstress.run.v.volatile_02_C; | |
10 | |
11 template atomicLoad( T ){ | |
12 T atomicLoad( inout T val ){ | |
13 volatile{ | |
14 return val; | |
15 } | |
16 } | |
17 } | |
18 | |
19 int main(){ | |
20 uint i; | |
21 atomicLoad!(uint)(i); | |
22 return 0; | |
23 } | |
24 | |
25 | |
26 |