search for: error_cb_data

Displaying 11 results from an estimated 11 matches for "error_cb_data".

2017 Jun 27
0
[PATCH v3 3/5] threads: Use thread-local storage for errors.
...sn't call the destructor associated with the key). + */ + +static void default_error_cb (guestfs_h *g, void *data, const char *msg); + +/* Stack of old error handlers. */ +struct error_cb_stack { + struct error_cb_stack *next; + guestfs_error_handler_cb error_cb; + void * error_cb_data; +}; + +/* Error data, stored in thread-local storage in g->error_data key. */ +struct error_data { + /* Linked list of error_data structs allocated for this handle. */ + struct error_data *next; + + char *last_error; /* Last error on handle. */ + int last_errnum; /*...
2015 Jun 06
0
[PATCH 3/5] threads: Use thread-local storage for errors.
...sn't call the destructor associated with the key). + */ + +static void default_error_cb (guestfs_h *g, void *data, const char *msg); + +/* Stack of old error handlers. */ +struct error_cb_stack { + struct error_cb_stack *next; + guestfs_error_handler_cb error_cb; + void * error_cb_data; +}; + +/* Error data, stored in thread-local storage in g->error_data key. */ +struct error_data { + /* Linked list of error_data structs allocated for this handle. */ + struct error_data *next; + + char *last_error; /* Last error on handle. */ + int last_errnum; /*...
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).
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
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 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...stfs_abort_cb r; + + ACQUIRE_LOCK (g); + r = unlocked_get_out_of_memory_handler (g); + RELEASE_LOCK (g); + return r; } void guestfs_set_error_handler (guestfs_h *g, guestfs_error_handler_cb cb, void *data) { + ACQUIRE_LOCK (g); g->error_cb = cb; g->error_cb_data = data; + RELEASE_LOCK (g); } -guestfs_error_handler_cb -guestfs_get_error_handler (guestfs_h *g, void **data_rtn) +static guestfs_error_handler_cb +unlocked_get_error_handler (guestfs_h *g, void **data_rtn) { if (data_rtn) *data_rtn = g->error_cb_data; return g->error_cb; } +gu...
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
...urn 0; + } + } + + /* All specified groups available. */ + return 1; } diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 49da6fe..bc03ccc 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -360,6 +360,12 @@ struct error_cb_stack { void * error_cb_data; }; +/* Cached queried features. */ +struct cached_feature { + char *group; + int result; +}; + /* The libguestfs handle. */ struct guestfs_h { @@ -502,6 +508,10 @@ struct guestfs_h unsigned int nr_requested_credentials; virConnectCredentialPtr requested_credentials; #endif + + /* C...
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
Rename the current available and feature_available into internal daemon functions, and provide non-daemon functions wrapping them at library side. This will make it possible to e.g. add caching for them. Should be only refactoring, no actual behaviour change. --- daemon/available.c | 4 +- generator/actions.ml | 192 ++++++++++++++++++++++++++++----------------------- po/POTFILES |
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...emulate the old-style callback API. + */ + void *opaque2; +}; + struct guestfs_h { struct guestfs_h *next; /* Linked list of open handles. */ @@ -133,16 +145,10 @@ struct guestfs_h guestfs_abort_cb abort_cb; guestfs_error_handler_cb error_cb; void * error_cb_data; - guestfs_log_message_cb log_message_cb; - void * log_message_cb_data; - guestfs_subprocess_quit_cb subprocess_quit_cb; - void * subprocess_quit_cb_data; - guestfs_launch_done_cb launch_done_cb; - void * launch_done_cb_data;...
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.