File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 2040a5c632caa8b0918979c552530782ca9e4a81
2
+ refs/heads/master: 22e3a8506f6d8ac9457214caf69de775c36b94ec
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Original file line number Diff line number Diff line change
1
+ #[ abi = "rust-intrinsic" ]
2
+ extern mod rusti {
3
+ fn atomic_xchng ( & dst: int , src : int ) -> int ;
4
+ fn atomic_xchng_acq ( & dst: int , src : int ) -> int ;
5
+ fn atomic_xchng_rel ( & dst: int , src : int ) -> int ;
6
+
7
+ fn atomic_add ( & dst: int , src : int ) -> int ;
8
+ fn atomic_add_acq ( & dst: int , src : int ) -> int ;
9
+ fn atomic_add_rel ( & dst: int , src : int ) -> int ;
10
+
11
+ fn atomic_sub ( & dst: int , src : int ) -> int ;
12
+ fn atomic_sub_acq ( & dst: int , src : int ) -> int ;
13
+ fn atomic_sub_rel ( & dst: int , src : int ) -> int ;
14
+ }
15
+
16
+ #[ inline( always) ]
17
+ fn atomic_xchng ( & dst: int , src : int ) -> int {
18
+ rusti:: atomic_xchng ( dst, src)
19
+ }
Original file line number Diff line number Diff line change
1
+ // xfail-fast - check-fast doesn't understand aux-build
2
+ // aux-build:cci_intrinsic.rs
3
+
4
+ // xfail-check
5
+
6
+ use cci_intrinsic;
7
+ import cci_intrinsic:: atomic_xchng;
8
+
9
+ fn main ( ) {
10
+ let mut x = 1 ;
11
+ atomic_xchng ( x, 5 ) ;
12
+ assert x == 5 ;
13
+ }
You can’t perform that action at this time.
0 commit comments