Displaying 7 results from an estimated 7 matches for "last_errnum".
Did you mean:
last_errno
2017 Jun 27
0
[PATCH v3 3/5] threads: Use thread-local storage for errors.
...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; /* errno, or 0 if there was no errno */
+
+ /* Error handler and stack of old error handlers. */
+ guestfs_error_handler_cb error_cb;
+ void * error_cb_data;
+ struct error_cb_stack *error_cb_stack;
+};
+
+static void
+free_error_data (struct error_data *...
2015 Jun 06
0
[PATCH 3/5] threads: Use thread-local storage for errors.
...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; /* errno, or 0 if there was no errno */
+
+ /* Error handler and stack of old error handlers. */
+ guestfs_error_handler_cb error_cb;
+ void * error_cb_data;
+ struct error_cb_stack *error_cb_stack;
+};
+
+static void
+free_error_data (struct error_data *...
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
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...*g)
+{
+ return g->last_error;
+}
+
const char *
guestfs_last_error (guestfs_h *g)
{
- return g->last_error;
+ const char *r;
+
+ ACQUIRE_LOCK (g);
+ r = unlocked_last_error (g);
+ RELEASE_LOCK (g);
+ return r;
+}
+
+static int
+unlocked_last_errno (guestfs_h *g)
+{
+ return g->last_errnum;
}
int
guestfs_last_errno (guestfs_h *g)
{
- return g->last_errnum;
+ int r;
+
+ ACQUIRE_LOCK (g);
+ r = unlocked_last_errno (g);
+ RELEASE_LOCK (g);
+ return r;
}
static void
@@ -164,36 +186,64 @@ guestfs_int_perrorf (guestfs_h *g, const char *fs, ...)
void
guestfs_set_out_of_...
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