)]}'
{
  "commit": "d351df188ddf4cc012692a0e179b24b8f492fb03",
  "tree": "8836d9dbdc8d270d0dbed316e7c851bdba32d65f",
  "parents": [
    "d3fdbebee333ee32d30697869f878c10dc963b59"
  ],
  "author": {
    "name": "Boqun Feng",
    "email": "boqun.feng@gmail.com",
    "time": "Wed Jun 18 09:49:33 2025 -0700"
  },
  "committer": {
    "name": "Boqun Feng",
    "email": "boqun.feng@gmail.com",
    "time": "Sun Jul 13 22:16:23 2025 -0700"
  },
  "message": "WIP: rust: sync: atomic: Add Atomic\u003c*mut T\u003e\n\nAdd atomic support for raw pointer values, similar to `isize` and\n`usize`, the representation type is selected based on CONFIG_64BIT.\n\n`*mut T` is not `Send`, however `Atomic\u003c*mut T\u003e` definitely needs to be\na `Sync`, and that\u0027s the whole point of atomics: being able to have\nmultiple shared references in different threads so that they can sync\nwith each other. As a result, a pointer value will be transferred from\none thread to another via `Atomic\u003c*mut T\u003e`:\n\n\t\u003cthread 1\u003e\t\t\u003cthread 2\u003e\n\tx.store(p1, Relaxed);\n\t\t\t\tlet p \u003d x.load(p1, Relaxed);\n\nThis means a raw pointer value (`*mut T`) needs to be able to transfer\nacross thread boundaries, which is essentially `Send`.\n\nTo reflect this in the type system, and based on the fact that pointer\nvalues can be transferred safely (only using them to dereference is\nunsafe), as suggested by Alice, extend the `AllowAtomic` trait to\ninclude a customized `Send` semantics, that is: `impl AllowAtomic` has\nto be safe to be transferred across thread boundaries.\n\nSuggested-by: Alice Ryhl \u003caliceryhl@google.com\u003e\nReviewed-by: Alice Ryhl \u003caliceryhl@google.com\u003e\nSigned-off-by: Boqun Feng \u003cboqun.feng@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3c1bb0c4d396b605f22f8eb23680e69ed242d118",
      "old_mode": 33188,
      "old_path": "rust/kernel/sync/atomic.rs",
      "new_id": "8bad89ed726ae43566ad0f326a0f45a3b612c666",
      "new_mode": 33188,
      "new_path": "rust/kernel/sync/atomic.rs"
    },
    {
      "type": "modify",
      "old_id": "9e239401720218fcfc9f2d0529eaf92524cf61ac",
      "old_mode": 33188,
      "old_path": "rust/kernel/sync/atomic/generic.rs",
      "new_id": "c61608036ba66b56ec43ffb49aa6ed40e19c0695",
      "new_mode": 33188,
      "new_path": "rust/kernel/sync/atomic/generic.rs"
    }
  ]
}
