From: Colin Walters Date: Mon, 20 Sep 2021 21:53:16 +0000 (-0400) Subject: Make `SePolicy` have `Send` X-Git-Tag: archive/raspbian/2022.4-1+rpi1^2~9^2^2~20^2~47 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e33767cc2a3d5e69538be4b0b8484780f64c0938;p=ostree.git Make `SePolicy` have `Send` It's safe to send between threads, and I want to do so in ostree-rs-ext to send to a tokio worker thread. --- diff --git a/rust-bindings/rust/conf/ostree.toml b/rust-bindings/rust/conf/ostree.toml index 1d72f850..64abc10a 100644 --- a/rust-bindings/rust/conf/ostree.toml +++ b/rust-bindings/rust/conf/ostree.toml @@ -192,6 +192,7 @@ status = "generate" [[object]] name = "OSTree.SePolicy" status = "generate" +concurrency = "send" [[object.function]] # [IGNORE] has an unused raw pointer parameter name = "fscreatecon_cleanup" diff --git a/rust-bindings/rust/src/auto/se_policy.rs b/rust-bindings/rust/src/auto/se_policy.rs index 029e0785..d6e93cd4 100644 --- a/rust-bindings/rust/src/auto/se_policy.rs +++ b/rust-bindings/rust/src/auto/se_policy.rs @@ -106,6 +106,8 @@ impl SePolicy { } } +unsafe impl Send for SePolicy {} + impl fmt::Display for SePolicy { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SePolicy")