search for: event_handl

Displaying 20 results from an estimated 101 matches for "event_handl".

Did you mean: event_handle
2006 Oct 31
0
6317254 missing lock_dev()/unlock_dev() in devfsadm event_handler()
Author: cth Repository: /hg/zfs-crypto/gate Revision: 855003e47284a1376b3ce65d9f3629b60711fed8 Log message: 6317254 missing lock_dev()/unlock_dev() in devfsadm event_handler() Files: update: usr/src/cmd/devfsadm/devfsadm.c
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...EVENT_ALL UINT64_MAX #ifndef GUESTFS_TYPEDEF_EVENT_CALLBACK #define GUESTFS_TYPEDEF_EVENT_CALLBACK 1 typedef void (*guestfs_event_callback) ( guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len); #endif #define LIBGUESTFS_HAVE_SET_EVENT_CALLBACK 1 int guestfs_set_event_callback (guestfs_h *g, guestfs_...
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a regression test.
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...void *opaque) +static int +unlocked_set_event_callback (guestfs_h *g, + guestfs_event_callback cb, + uint64_t event_bitmask, + int flags, + void *opaque) { int event_handle; @@ -70,8 +70,23 @@ guestfs_set_event_callback (guestfs_h *g, return event_handle; } -void -guestfs_delete_event_callback (guestfs_h *g, int event_handle) +int +guestfs_set_event_callback (guestfs_h *g, + guestfs_event_callback cb, + ui...
2023 Feb 13
3
Issue with downloading files whose path contains multi-byte utf-8 characters
...mized out>) at /usr/include/ > python3.9/object.h:408 > #3 ?guestfs_int_py_event_callback_wrapper > ? ? (g=<optimized out>, flags=<optimized out>, array_len=0, array=0x0, buf_len= > 47, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug settle -E \303by", > event_handle=0, event=16, callback=0x7ffff2516600) at handle.c:137 > #4 ?guestfs_int_py_event_callback_wrapper > ? ? (g=<optimized out>, callback=0x7ffff2516600, event=16, event_handle=0, > flags=<optimized out>, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug > settle -E \303...
2023 Feb 12
1
Issue with downloading files whose path contains multi-byte utf-8 characters
...in _Py_INCREF (op=<optimized out>) at /usr/include/python3.9/object.h:408 #3 guestfs_int_py_event_callback_wrapper (g=<optimized out>, flags=<optimized out>, array_len=0, array=0x0, buf_len=47, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug settle -E \303by", event_handle=0, event=16, callback=0x7ffff2516600) at handle.c:137 #4 guestfs_int_py_event_callback_wrapper (g=<optimized out>, callback=0x7ffff2516600, event=16, event_handle=0, flags=<optimized out>, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug settle -E \303by", buf_len=47...
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
...* +guestfs_close+[http://libguestfs.org/guestfs.3.html#guestfs_close] + * {guestfs_close}[http://libguestfs.org/guestfs.3.html#guestfs_close] * to close the libguestfs handle. */ static VALUE @@ -258,7 +258,7 @@ ruby_guestfs_close (VALUE gv) * g.set_event_callback(cb, event_bitmask) -> event_handle * * Call - * +guestfs_set_event_callback+[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback] + * {guestfs_set_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback] * to register an event callback. This returns an event handle. */ static VALUE @@ -...
2023 Feb 14
2
[PATCH 1/2] python: Avoid crash if callback parameters cannot be built
...--git a/python/handle.c b/python/handle.c index c8752baf47..f37e939e03 100644 --- a/python/handle.c +++ b/python/handle.c @@ -134,18 +134,21 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, args = Py_BuildValue ("(Kis#O)", (unsigned PY_LONG_LONG) event, event_handle, buf, buf_len, py_array); + if (args == NULL) { + PyErr_PrintEx (0); + goto out; + } + Py_INCREF (args); - py_r = PyObject_CallObject (py_callback, args); - Py_DECREF (args); - if (py_r != NULL) Py_DECREF (py_r); else /* Callback threw an e...
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...; + > >> + wqent->mvdev = &ndev->mvdev; > >> + INIT_WORK(&wqent->work, update_carrier); > >> + queue_work(ndev->mvdev.wq, &wqent->work); > >> + return 0; > >> +} > >> + > >> +static int event_handler(struct notifier_block *nb, unsigned long event, void *param) > >> +{ > >> + struct mlx5_vdpa_net *ndev = container_of(nb, struct mlx5_vdpa_net, nb); > >> + struct mlx5_eqe *eqe = param; > >> + int ret = NOTIFY_DONE; > >> + > >&g...
2010 Dec 22
2
Callbacks, log messages etc.
...ive each event a level (an integer). (iii) Each event can optionally have some content. For log messages this is a string with length, for progress messages it is a struct of numbers. Callers can register to receive events in a bitmask class and at a set of levels by doing: int /* event_handle */ guestfs_set_event_callback (guestfs_h *g, guestfs_event_callback cb, uint64_t event_class_bitmask, int min_level, void *opaque); void guestfs_delete_event_callback (guestf...
2023 Feb 14
2
[PATCH 2/2] python: Use bytes instead of str for event callback buffer
...@@ -131,7 +131,7 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, } /* XXX As with Perl we don't pass the guestfs_h handle here. */ - args = Py_BuildValue ("(Kis#O)", + args = Py_BuildValue ("(Kiy#O)", (unsigned PY_LONG_LONG) event, event_handle, buf, buf_len, py_array); if (args == NULL) { -- 2.39.0
2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
...pr "\n"; ) external_functions_sorted; @@ -223,23 +230,30 @@ end class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object method close : unit -> unit + (** See {!Guestfs.close} *) method set_event_callback : event_callback -> event list -> event_handle + (** See {!Guestfs.set_event_callback} *) method delete_event_callback : event_handle -> unit + (** See {!Guestfs.delete_event_callback} *) method last_errno : unit -> int + (** See {!Guestfs.last_errno} *) method ocaml_handle : t + (** Return the {!Guestfs.t} handle *) "...
2023 Jun 27
1
[PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls
...s-c.h" @@ -395,12 +396,12 @@ event_callback_wrapper (guestfs_h *g, /* Ensure we are holding the GC lock before any GC operations are * possible. (RHBZ#725824) */ - caml_leave_blocking_section (); + caml_acquire_runtime_system (); event_callback_wrapper_locked (g, data, event, event_handle, flags, buf, buf_len, array, array_len); - caml_enter_blocking_section (); + caml_release_runtime_system (); } value -- 2.41.0
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a quick 1.30 release soon, and save this patch, and also the extensive changes proposed for the test suite[1], to after 1.30. Currently it is not safe to use the same handle from multiple threads, unless you implement your own mutexes. See: http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads These
2004 Aug 06
1
ices: Metadata for im_stdinpcm
...+static void close_module(input_module_t *mod) +{ + if(mod) + { + if(mod->internal) + { + stdinpcm_state *s = mod->internal; + thread_mutex_destroy(&s->metadatalock); + free(s); + } + free(mod); + } +} + static int event_handler(input_module_t *mod, enum event_type ev, void *param) { + stdinpcm_state *s = mod->internal; + switch(ev) { case EVENT_SHUTDOWN: @@ -50,6 +67,20 @@ case EVENT_NEXTTRACK: ((stdinpcm_state *)mod->internal)->newtrack = 1; break; +...
2012 Apr 26
3
[PATCH 1/3] gobject: NFC generated code formatting fix
--- generator/generator_gobject.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator_gobject.ml b/generator/generator_gobject.ml index e4c175b..48ddbf0 100644 --- a/generator/generator_gobject.ml +++ b/generator/generator_gobject.ml @@ -391,7 +391,7 @@ let generate_gobject_optargs_source name optargs flags () = pr "G_DEFINE_TYPE(%s, guestfs_%s,
2023 Jun 27
4
[PATCH libguestfs 0/4] Fix ups for OCaml 5
No action required here as I have pushed this already, this is just for your information. Rich.
2015 Sep 30
3
[PATCH 1/2] ocaml: Use ocamlfind to run ocamldoc.
Using 'ocamlfind ocamldoc' is much faster than running 'ocamldoc' directly, because ocamlfind will run the native code program 'ocamldoc.opt' if it is available. This change approximately halves the time taken to compile the ocaml bindings. --- ocaml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index
2019 Jul 30
0
Re: [PATCH] Rust bindings: Implement Event features
...r::Error> >+ where >+ C: Fn(guestfs::Event, EventHandle, &[u8], &[u64]), >+ { >+ extern "C" fn trampoline<C>( >+ _g: *const base::guestfs_h, >+ opaque: *const c_void, >+ event: u64, >+ event_handle: i32, >+ _flags: i32, >+ buf: *const c_char, >+ buf_len: usize, >+ array: *const u64, >+ array_len: usize, >+ ) where >+ C: Fn(guestfs::Event, EventHandle, &[u8], &[u64]), >+ { >+...
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
...100644 --- a/ruby/t/tc_410_close_event.rb +++ b/ruby/t/tc_410_close_event.rb @@ -22,7 +22,7 @@ require 'guestfs' class TestLoad < Test::Unit::TestCase def test_events - g = Guestfs::create() + g = Guestfs::Guestfs.new() close_invoked = 0 close = Proc.new {| event, event_handle, buf, array | diff --git a/ruby/t/tc_420_log_messages.rb b/ruby/t/tc_420_log_messages.rb index 3fe70de..b734fb8 100644 --- a/ruby/t/tc_420_log_messages.rb +++ b/ruby/t/tc_420_log_messages.rb @@ -22,7 +22,7 @@ require 'guestfs' class TestLoad < Test::Unit::TestCase def test_events...