Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions src/librustc/middle/typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3476,29 +3476,31 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) {

//We only care about the operation here
match split[1] {
"cxchg" => (0, ~[ty::mk_mut_rptr(tcx,
ty::re_bound(ty::br_anon(0)),
ty::mk_int()),
ty::mk_int(),
ty::mk_int()
], ty::mk_int()),
"load" => (0,
~[
ty::mk_imm_rptr(tcx, ty::re_bound(ty::br_anon(0)), ty::mk_int())
],
ty::mk_int()),
"store" => (0,
~[
ty::mk_mut_rptr(tcx, ty::re_bound(ty::br_anon(0)), ty::mk_int()),
ty::mk_int()
],
ty::mk_nil()),
"cxchg" => {
(0,
~[
ty::mk_mut_ptr(tcx, ty::mk_int()),
ty::mk_int(),
ty::mk_int()
],
ty::mk_int())
}
"load" => {
(0,
~[ty::mk_imm_ptr(tcx, ty::mk_int())],
ty::mk_int())
}
"store" => {
(0,
~[ty::mk_mut_ptr(tcx, ty::mk_int()), ty::mk_int()],
ty::mk_nil())
}

"xchg" | "xadd" | "xsub" | "and" | "nand" | "or" | "xor" | "max" |
"min" | "umax" | "umin" => {
(0, ~[ty::mk_mut_rptr(tcx,
ty::re_bound(ty::br_anon(0)),
ty::mk_int()), ty::mk_int() ], ty::mk_int())
(0,
~[ty::mk_mut_ptr(tcx, ty::mk_int()), ty::mk_int()],
ty::mk_int())
}

op => {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/rt/comm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl<T> Peekable<T> for PortOne<T> {
fn peek(&self) -> bool {
unsafe {
let packet: *mut Packet<T> = self.inner.packet();
let oldstate = atomic_load(&mut (*packet).state);
let oldstate = atomic_load(&(*packet).state);
match oldstate {
STATE_BOTH => false,
STATE_ONE => (*packet).payload.is_some(),
Expand Down
Loading