GitHub PullRequestReviewCommentEvent at 2014-02-06 17:50:15
Repository: rust
Actor: TheHydroImpulse
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/rust/pulls/comments/9510163","id":9510163,"diff_hunk":"@@ -0,0 +1,180 @@\n+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\n+// file at the top-level directory of this distribution and at\n+// http://rust-lang.org/COPYRIGHT.\n+//\n+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n+// option. This file may not be copied, modified, or distributed\n+// except according to those terms.\n+\n+/*!\n+ * Volatile types and operations.\n+ */\n+\n+use unstable::intrinsics;\n+use cast::transmute;\n+\n+pub struct VolatileBool {\n+    v: uint\n+}\n+\n+pub struct VolatileInt {\n+    v: int\n+}\n+\n+pub struct VolatileUint {\n+    v: uint\n+}\n+\n+\n+pub static INIT_VOLATILE_BOOL: VolatileBool = VolatileBool { v: 0 };\n+pub static INIT_VOLATILE_INT: VolatileInt = VolatileInt { v: 0 };\n+\n+\n+impl VolatileInt {\n+\n+    pub fn new(val: int) -> VolatileInt {\n+        VolatileInt { v: val }\n+    }\n+\n+    #[inline]\n+    pub fn store(&mut self, val: int) {\n+        unsafe {\n+            intrinsics::volatile_store(transmute(&self.v), val);","path":"src/libstd/unstable/volatile.rs","position":44,"original_position":44,"commit_id":"80180f9a837df8519d1ff6d5eeefe99d7a674af1","original_commit_id":"80180f9a837df8519d1ff6d5eeefe99d7a674af1","user":{"login":"TheHydroImpulse","id":565790,"avatar_url":"https://gravatar.com/avatar/e58dfef0ae4af7a5f672bb89fa299ba8?d=https%3A%2F%2Fidenticons.github.com%2F7fb6906e719f843f8ad49f2de787fa00.png&r=x","gravatar_id":"e58dfef0ae4af7a5f672bb89fa299ba8","url":"https://api.github.com/users/TheHydroImpulse","html_url":"https://github.com/TheHydroImpulse","followers_url":"https://api.github.com/users/TheHydroImpulse/followers","following_url":"https://api.github.com/users/TheHydroImpulse/following{/other_user}","gists_url":"https://api.github.com/users/TheHydroImpulse/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHydroImpulse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHydroImpulse/subscriptions","organizations_url":"https://api.github.com/users/TheHydroImpulse/orgs","repos_url":"https://api.github.com/users/TheHydroImpulse/repos","events_url":"https://api.github.com/users/TheHydroImpulse/events{/privacy}","received_events_url":"https://api.github.com/users/TheHydroImpulse/received_events","type":"User","site_admin":false},"body":"Will do.","created_at":"2014-02-06T17:50:15Z","updated_at":"2014-02-06T17:50:15Z","html_url":"https://github.com/mozilla/rust/pull/12063#discussion_r9510163","pull_request_url":"https://api.github.com/repos/mozilla/rust/pulls/12063","_links":{"self":{"href":"https://api.github.com/repos/mozilla/rust/pulls/comments/9510163"},"html":{"href":"https://github.com/mozilla/rust/pull/12063#discussion_r9510163"},"pull_request":{"href":"https://api.github.com/repos/mozilla/rust/pulls/12063"}}}}