search for: g_idle_add

Displaying 13 results from an estimated 13 matches for "g_idle_add".

2016 May 30
2
[PATCH 0/2] p2v: Allow virt-p2v to be built with Gtk 2 or 3.
... and a small initial patch which makes it easier to test virt-p2v without having to start up a virtual machine. There is still a bug in Gtk 3 where the GtkTextView on the final (running) dialog ignores gtk_widget_set_size_request and so the window appears just a single pixel high. Rich.
2016 May 30
4
[PATCH v2 0/3] p2v: Allow virt-p2v to be built with Gtk 2 or 3.
This is basically the same as what I posted earlier today. The main difference is I split out the GDK thread sychronization (removal of) changes from the other Gtk 2/3 changes, which should make it a bit easier to review. Gtk 3 is still not quite perfect. Apart from the problem with the GtkTextView noted before, there are also vertical alignment and padding problems with labels in GtkGrid
2019 Jul 15
2
[PATCH libnbd] examples: Include an example of integrating with the glibc main loop.
** NOT WORKING ** This patch shows how to integrate libnbd and the glib main loop. Posted mainly as a point of discussion as it doesn't quite work yet. Rich.
2019 Jul 30
0
[PATCH libnbd] examples: Fix theoretical cookie race in example.
...if (buffers[i].rcookie == rcookie) - goto found; - } - /* This should never happen. */ - abort (); - - found: - buffers[i].state = BUFFER_READ_COMPLETED; + assert (buffer->state == BUFFER_READING); + buffer->state = BUFFER_READ_COMPLETED; /* Create a writer idle handler. */ - g_idle_add (write_data, NULL); + g_idle_add (write_data, buffer); return 1; } @@ -432,31 +421,19 @@ finished_read (unsigned valid_flag, void *vp, int64_t rcookie, int *error) static gboolean write_data (gpointer user_data) { - size_t i; + struct buffer *buffer = user_data; if (gsdest == NULL)...
2019 Jul 17
1
Re: [PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...count++; > + if (count == 2) { > + DEBUG (source, "both handles are connected"); > + > + /* Now that both handles are connected, we can begin copying. > + * Register an idle handler that will repeatedly read from the > + * source. > + */ > + g_idle_add (read_data, NULL); > + } > +} > + > +/* This idle callback reads data from the source nbdkit until the ring > + * is full. > + */ > +static gboolean > +read_data (gpointer user_data) > +{ > + static uint64_t posn = 0; > + const size_t i = nr_buffers; > + >...
2019 Jul 15
0
[PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...*source) +{ + static int count = 0; + + count++; + if (count == 2) { + DEBUG (source, "both handles are connected"); + + /* Now that both handles are connected, we can begin copying. + * Register an idle handler that will repeatedly read from the + * source. + */ + g_idle_add (read_data, NULL); + } +} + +/* This idle callback reads data from the source nbdkit until the ring + * is full. + */ +static gboolean +read_data (gpointer user_data) +{ + static uint64_t posn = 0; + const size_t i = nr_buffers; + + if (gssrc == NULL) + return FALSE; + + /* Finished reading...
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...*source) +{ + static int count = 0; + + count++; + if (count == 2) { + DEBUG (source, "both handles are connected"); + + /* Now that both handles are connected, we can begin copying. + * Register an idle handler that will repeatedly read from the + * source. + */ + g_idle_add (read_data, NULL); + } +} + +/* This idle callback reads data from the source nbdkit until the ring + * is full. + */ +static gboolean +read_data (gpointer user_data) +{ + static uint64_t posn = 0; + const size_t i = nr_buffers; + + if (gssrc == NULL) + return FALSE; + + /* Finished reading...
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's review, *except* that it still doesn't retire commands (although this seems to make no obvious difference, except possibly a performance and memory impact). Rich.
2019 Jul 30
4
[PATCH libnbd] examples: Fix theoretical cookie race in example.
Previously discussed here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html It turns out that deferring callbacks is a PITA. (It would be a bit easier if C has closures.) However by rewriting the example we can avoid the need to use the cookie at all and make it run a bit more efficiently, so let's do that instead. Rich.
2008 Sep 01
1
Porting Swfdec to Mac OS X & Timing question
Hi all: I've been working on porting Swfdec to Mac OS X on my own time. So far I'm making some progress; stuff is displaying and events are working. I still have a bit of work to do, but in the meantime, I have some questions: 1. How does one get the ability to commit things to the repository? I don't expect this right away; I'll probably just distribute the Mac OS X
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
...rce, "finalize"); + assert (nbd_aio_in_flight (source->nbd) == 0); + assert (nbd_aio_peek_command_completed (source->nbd) == -1); nbd_close (source->nbd); } @@ -418,7 +420,7 @@ finished_read (void *vp, int64_t rcookie, int *error) /* Create a writer idle handler. */ g_idle_add (write_data, NULL); - return 0; + return 1; } /* This idle callback schedules a write. */ @@ -507,5 +509,5 @@ finished_write (void *vp, int64_t wcookie, int *error) g_main_loop_quit (loop); } - return 0; + return 1; } diff --git a/generator/generator b/generator/generator index fd...
2019 Sep 10
3
[PATCH 0/2] Remove virt-p2v from libguestfs
Now that virt-p2v has its own repository [1] and releases [2], it is time to remove it from libguestfs. [1] https://github.com/libguestfs/virt-p2v [2] http://download.libguestfs.org/virt-p2v/ Pino Toscano (2): Remove virt-p2v Remove remaining virt-p2v bits .gitignore | 4 - Makefile.am | 7 +- bash/Makefile.am
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence interpreter, so that colours displayed by the remote virt-v2v are now shown to the user. (https://bugzilla.redhat.com/show_bug.cgi?id=1314244) This requires virt-v2v to send colours. It wasn't doing that because the output was a pipe (as we capture the output into the log file). So I added a global --colours option to make