Displaying 8 results from an estimated 8 matches for "event_callback_wrapper".
2023 Jun 27
1
[PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls
...0644
--- a/ocaml/guestfs-c.c
+++ b/ocaml/guestfs-c.c
@@ -34,6 +34,7 @@
#include <caml/mlvalues.h>
#include <caml/printexc.h>
#include <caml/signals.h>
+#include <caml/threads.h>
#include <caml/unixsupport.h>
#include "guestfs-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,
b...
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.
2023 May 27
2
[PATCH libguestfs 2/2] Only leave/enter blocking_section when OCaml lock is not held
...held:
Fatal error during lock: Resource deadlock avoided
---
ocaml/guestfs-c.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c
index 3888c9456..bcf8e6ab3 100644
--- a/ocaml/guestfs-c.c
+++ b/ocaml/guestfs-c.c
@@ -395,12 +395,16 @@ 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 ();
+ bool in_blocking_section = (caml_state == NULL);
+
+ if (in_blocking_section)
+ caml_leave_blocking_section ();
event_callback_wrap...
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's
not appropriate for language bindings, and we never intended that
these internal functions be used from language bindings, that was just
a historical accident.
This patch series removes any external use of the safe_* functions.
Rich.
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 Oct 05
0
[PATCH 2/2] Fix whitespace.
...tderr, _("%s: %s command failed\n"),
+ guestfs_int_program_name, argv[0]);
return -1;
}
return 0;
diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c
index 03e3659..cbff846 100644
--- a/ocaml/guestfs-c.c
+++ b/ocaml/guestfs-c.c
@@ -49,11 +49,11 @@ static void event_callback_wrapper (guestfs_h *g, void *data, uint64_t event, in
/* This macro was added in OCaml 3.10. Backport for earlier versions. */
#ifndef CAMLreturnT
-#define CAMLreturnT(type, result) do{ \
- type caml__temp_result = (result); \
- caml_local_roots = caml__frame; \
- return (caml__temp_result); \
-}wh...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67
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.