<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/rust/kernel/types.rs, branch v6.2.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>rust: types: add `Opaque` type</title>
<updated>2022-12-04T00:59:16+00:00</updated>
<author>
<name>Wedson Almeida Filho</name>
<email>wedsonaf@gmail.com</email>
</author>
<published>2022-11-10T16:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b9ecf9b9ac5969d7b7ea786ce5c76e24246df2c5'/>
<id>b9ecf9b9ac5969d7b7ea786ce5c76e24246df2c5</id>
<content type='text'>
Add the `Opaque` type, which is meant to be used with FFI objects
that are never interpreted by Rust code, e.g.:

    struct Waiter {
        completion: Opaque&lt;bindings::completion&gt;,
        next: *mut Waiter,
    }

It has the advantage that the objects don't have to be
zero-initialised before calling their init functions, making
the code performance closer to C.

Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@gmail.com&gt;
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the `Opaque` type, which is meant to be used with FFI objects
that are never interpreted by Rust code, e.g.:

    struct Waiter {
        completion: Opaque&lt;bindings::completion&gt;,
        next: *mut Waiter,
    }

It has the advantage that the objects don't have to be
zero-initialised before calling their init functions, making
the code performance closer to C.

Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@gmail.com&gt;
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust: types: add `Either` type</title>
<updated>2022-12-04T00:59:16+00:00</updated>
<author>
<name>Wedson Almeida Filho</name>
<email>wedsonaf@gmail.com</email>
</author>
<published>2022-11-10T16:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba20915bae49024dab6ee582abdd4cd8944a3e55'/>
<id>ba20915bae49024dab6ee582abdd4cd8944a3e55</id>
<content type='text'>
Introduce the new `types` module of the `kernel` crate with
`Either` as its first type.

`Either&lt;L, R&gt;` is a sum type that always holds either a value
of type `L` (`Left` variant) or `R` (`Right` variant).

For instance:

    struct Executor {
        queue: Either&lt;BoxedQueue, &amp;'static Queue&gt;,
    }

Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@gmail.com&gt;
Reviewed-by: Wei Liu &lt;wei.liu@kernel.org&gt;
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce the new `types` module of the `kernel` crate with
`Either` as its first type.

`Either&lt;L, R&gt;` is a sum type that always holds either a value
of type `L` (`Left` variant) or `R` (`Right` variant).

For instance:

    struct Executor {
        queue: Either&lt;BoxedQueue, &amp;'static Queue&gt;,
    }

Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@gmail.com&gt;
Reviewed-by: Wei Liu &lt;wei.liu@kernel.org&gt;
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
