Displaying 18 results from an estimated 18 matches for "guestfs_delete_event_callback".
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
...guestfs.org/guestfs.3.html#guestfs_set_event_callback]
* to register an event callback. This returns an event handle.
*/
static VALUE
@@ -297,7 +297,7 @@ ruby_set_event_callback (VALUE gv, VALUE cbv, VALUE event_bitmaskv)
* g.delete_event_callback(event_handle) -> nil
*
* Call
- * +guestfs_delete_event_callback+[http://libguestfs.org/guestfs.3.html#guestfs_delete_event_callback]
+ * {guestfs_delete_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_delete_event_callback]
* to delete an event callback.
*/
static VALUE
@@ -328,7 +328,7 @@ ruby_delete_event_callback (VALUE gv, VALUE event_hand...
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...guestfs_set_event_callback (guestfs_h *g,
guestfs_event_callback cb,
uint64_t event_bitmask,
int flags,
void *opaque);
#define LIBGUESTFS_HAVE_DELETE_EVENT_CALLBACK 1
void guestfs_delete_event_callback (guestfs_h *g, int event_handle);
----------------------------------------------------------------------
SETTING CALLBACKS TO HANDLE EVENTS
Note: This section documents the new-style event mechanism, which you
should use in new code if possible. The old functions
"gu...
2010 Dec 22
2
Callbacks, log messages etc.
...evels 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 (guestfs_h *g, int event_handle);
'guestfs_set_event_callback' would register a callback for all event
classes in 'event_class_bitmask' at level >= 'min_level'. This would
return an integer which can be used to delete this callback, by
calling 'guestfs_delete_event_...
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...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,
+ uint64_t event_bitmask,
+ int flags,
+ void *opaque)
+{
+ int r;
+
+ ACQUIRE_...
2015 Oct 06
0
[PATCH 1/4] ocaml: Use generational global roots.
...ely on every
- * user having the OCaml 3.11 version which supports this.
- */
- caml_register_global_root (root);
+ caml_register_generational_global_root (root);
snprintf (key, sizeof key, "_ocaml_event_%d", eh);
guestfs_set_private (g, key, root);
@@ -280,7 +274,7 @@ ocaml_guestfs_delete_event_callback (value gv, value ehv)
value *root = guestfs_get_private (g, key);
if (root) {
- caml_remove_global_root (root);
+ caml_remove_generational_global_root (root);
free (root);
guestfs_set_private (g, key, NULL);
guestfs_delete_event_callback (g, eh);
--
2.5.0
2012 Jan 18
4
[PATCH 1/4] ocaml: Add -Wno-missing-field-initializers to avoid a warning.
From: "Richard W.M. Jones" <rjones at redhat.com>
---
configure.ac | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index fa97479..6e42423 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,10 @@ if test "$gl_gcc_warnings" = yes; then
# Work around warning in src/inspect.c. This seems to be a bug in gcc
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
...u64,
+ usize,
+);
+
+#[link(name = "guestfs")]
+extern "C" {
+ fn guestfs_set_event_callback(
+ g: *const base::guestfs_h,
+ cb: GuestfsEventCallback,
+ event_bitmask: u64,
+ flags: i32,
+ opaque: *const c_void,
+ ) -> i32;
+ fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32);
+ fn guestfs_event_to_string(bitmask: u64) -> *const c_char;
+ fn free(buf: *const c_void);
+}
+
#[derive(Hash, PartialEq, Eq)]
pub struct EventHandle {
eh: i32,
}
+
+fn events_to_bitmask(v: &[guestfs::Event]) -> u64 {
+ let mut r = 0u...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of
local disk.
Rich.
2019 Jul 30
4
[PATCH] Rust bindings: Implement Event features
...u64,
+ usize,
+);
+
+#[link(name = "guestfs")]
+extern "C" {
+ fn guestfs_set_event_callback(
+ g: *const base::guestfs_h,
+ cb: GuestfsEventCallback,
+ event_bitmask: u64,
+ flags: i32,
+ opaque: *const c_void,
+ ) -> i32;
+ fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32);
+ fn guestfs_event_to_string(bitmask: u64) -> *const c_char;
+ fn free(buf: *const c_void);
+}
+
+#[derive(Hash, PartialEq, Eq)]
+pub struct EventHandle {
+ eh: i32,
+}
+
+pub type Callback = FnMut(guestfs::Event, EventHandle, &[i8], &[u64]);...
2019 Jul 30
0
Re: [PATCH] Rust bindings: Implement Event features
...= "guestfs")]
>+extern "C" {
>+ fn guestfs_set_event_callback(
>+ g: *const base::guestfs_h,
>+ cb: GuestfsEventCallback,
>+ event_bitmask: u64,
>+ flags: i32,
>+ opaque: *const c_void,
>+ ) -> i32;
>+ fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32);
>+ fn guestfs_event_to_string(bitmask: u64) -> *const c_char;
>+ fn free(buf: *const c_void);
>+}
>+
>+#[derive(Hash, PartialEq, Eq)]
>+pub struct EventHandle {
>+ eh: i32,
>+}
>+
>+pub type Callback = FnMut(guestfs::Eve...
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
2019 Aug 05
3
Re: [PATCH] Rust bindings: Implement Event features
I fixed based on comments.
I'll send these two patches to this mailing list.
- Fix Handle -> Handle<'a>
- Add events
Regards,
Hiroyuki
2019年8月1日(木) 0:01 Pino Toscano <ptoscano@redhat.com>:
> Hi Hiroyuki,
>
> On Tuesday, 30 July 2019 07:51:37 CEST Hiroyuki Katsura wrote:
> > This patch includes:
> >
> > - Event callback handlers
> > -
2019 Jul 30
1
Re: [PATCH] Rust bindings: Implement Event features
...ot;C" {
> >+ fn guestfs_set_event_callback(
> >+ g: *const base::guestfs_h,
> >+ cb: GuestfsEventCallback,
> >+ event_bitmask: u64,
> >+ flags: i32,
> >+ opaque: *const c_void,
> >+ ) -> i32;
> >+ fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32);
> >+ fn guestfs_event_to_string(bitmask: u64) -> *const c_char;
> >+ fn free(buf: *const c_void);
> >+}
> >+
> >+#[derive(Hash, PartialEq, Eq)]
> >+pub struct EventHandle {
> >+ eh: i32,
> >+}
> >...
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 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here:
https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048
v2:
- Use a cleanup handler to release the lock.
- Rebase to upstream.
Note I have not fixed the problem(s) with error handling (patch 3).
2017 Jun 27
9
[PATCH v3 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015:
v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html
v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html
I have rebased and tidied up the patches, fixing a few spelling
mistakes, but they are broadly the same as before. I also ran all the
tests, which pass.
As with the previous versions, this makes a change to the API, where
you
2017 Jul 21
6
[PATCH v3 REPOST 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015:
v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html
v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html
This series was posted about 4 weeks ago:
v3: https://www.redhat.com/archives/libguestfs/2017-June/msg00287.html
There is no change in this series except I rebased it against current
upstream head and retested. Last time there
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.