Displaying 3 results from an estimated 3 matches for "myplugin_thread_model".
2019 Aug 16
7
[nbdkit PATCH 0/2] rust: Implement some missing v2 callbacks
Similar to what I just did for OCaml (this IS an API break, requiring
recompilation of any existing Rust plugin), and done because I want to
add fast_zero support to both languages as part of my upcoming fast
zero series.
Figuring out how to get extents working was hard enough that I punted
that, still.
Eric Blake (2):
rust: Implement can_cache
rust: Add support for dynamic .thread_model
2019 Aug 16
0
[nbdkit PATCH 2/2] rust: Add support for dynamic .thread_model
...t-rust-plugin.pod b/plugins/rust/nbdkit-rust-plugin.pod
index 930829cc..61c2e0ba 100644
--- a/plugins/rust/nbdkit-rust-plugin.pod
+++ b/plugins/rust/nbdkit-rust-plugin.pod
@@ -37,14 +37,19 @@ compatible with the C struct used by C plugins.
use nbdkit::ThreadModel::*;
#[no_mangle]
+ extern fn myplugin_thread_model () -> ThreadModel {
+ Serialize_AllRequests
+ }
+
+ //... more functions
+
pub extern fn plugin_init () -> *const Plugin {
// Plugin name.
let name = "myplugin\0"
as *const str as *const [c_char] as *const c_char;
- // Create a mutable plugin, setting the...
2019 Aug 16
1
Re: [nbdkit PATCH 2/2] rust: Add support for dynamic .thread_model
...rust-plugin.pod
> index 930829cc..61c2e0ba 100644
> --- a/plugins/rust/nbdkit-rust-plugin.pod
> +++ b/plugins/rust/nbdkit-rust-plugin.pod
> @@ -37,14 +37,19 @@ compatible with the C struct used by C plugins.
> use nbdkit::ThreadModel::*;
>
> #[no_mangle]
> + extern fn myplugin_thread_model () -> ThreadModel {
> + Serialize_AllRequests
> + }
> +
> + //... more functions
> +
> pub extern fn plugin_init () -> *const Plugin {
> // Plugin name.
> let name = "myplugin\0"
> as *const str as *const [c_char] as *const c_char;...