search for: set_thread_model

Displaying 6 results from an estimated 6 matches for "set_thread_model".

2019 Aug 15
2
[nbdkit PATCH] ocaml: Add support for dynamic .thread_model
...(int, -1); + } + + caml_enter_blocking_section (); + CAMLreturnT (int, Int_val (rv)); +} + /*----------------------------------------------------------------------*/ /* set_* functions called from OCaml code at load time to initialize * fields in the plugin struct. */ -value -ocaml_nbdkit_set_thread_model (value modelv) -{ - plugin._thread_model = Int_val (modelv); - return Val_unit; -} - value ocaml_nbdkit_set_name (value namev) { @@ -775,6 +790,8 @@ SET(extents) SET(can_cache) SET(cache) +SET(thread_model) + #undef SET static void @@ -817,6 +834,8 @@ remove_roots (void) REMOVE (can_c...
2020 Feb 10
1
[nbdkit PATCH] ocaml: Support .preconnect callback
...-> unit) option; } let default_callbacks = { @@ -145,6 +147,8 @@ let default_callbacks = { thread_model = None; can_fast_zero = None; + + preconnect = None; } external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" @@ -192,6 +196,8 @@ external set_thread_model : (unit -> thread_model) -> unit = "ocaml_nbdkit_set_t external set_can_fast_zero : ('a -> bool) -> unit = "ocaml_nbdkit_set_can_fast_zero" +external set_preconnect : (bool -> unit) -> unit = "ocaml_nbdkit_set_preconnect" + let may f = function Non...
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
...ache = None; thread_model = None; + + can_fast_zero = None; } external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" @@ -186,6 +190,8 @@ external set_cache : ('a -> int32 -> int64 -> flags -> unit) -> unit = "ocaml_nb external set_thread_model : (unit -> thread_model) -> unit = "ocaml_nbdkit_set_thread_model" +external set_can_fast_zero : ('a -> bool) -> unit = "ocaml_nbdkit_set_can_fast_zero" + let may f = function None -> () | Some a -> f a let register_plugin plugin = @@ -249,7 +255,9 @@ l...
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete method before to do two different things (complete configuration; do any allocation/housekeeping necessary before we can start serving). The only questions in my mind are whether we want this before 1.18, and whether the name ("get_ready") is a good one. Rich.
2020 Jun 22
4
[PATCH nbdkit 1/2] server: Add .after_fork callback, mainly for plugins to create threads.
...ion; @@ -114,6 +115,7 @@ let default_callbacks = { thread_model = None; get_ready = None; + after_fork = None; preconnect = None; open_connection = None; @@ -157,6 +159,7 @@ external set_config_help : string -> unit = "ocaml_nbdkit_set_config_help" "noal external set_thread_model : (unit -> thread_model) -> unit = "ocaml_nbdkit_set_thread_model" external set_get_ready : (unit -> unit) -> unit = "ocaml_nbdkit_set_get_ready" +external set_after_fork : (unit -> unit) -> unit = "ocaml_nbdkit_set_after_fork" external set_prec...
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a