search for: g_io_out

Displaying 16 results from an estimated 16 matches for "g_io_out".

Did you mean: cpio_out
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 15
0
[PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...the GSource functions for libnbd handles. */ +static inline int +events_from_nbd (struct nbd_handle *nbd) +{ + int dir = nbd_aio_get_direction (nbd); + int r = 0; + + if ((dir & LIBNBD_AIO_DIRECTION_READ) != 0) + r |= G_IO_IN; + if ((dir & LIBNBD_AIO_DIRECTION_WRITE) != 0) + r |= G_IO_OUT; + return r; +} + +static gboolean +prepare (GSource *sp, gint *timeout_) +{ + struct NBDSource *source = (struct NBDSource *) sp; + + /* When the NBD handle moves out of the created state (which means + * that it first has a socket associated with it) we must initialize + * and register the...
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...the GSource functions for libnbd handles. */ +static inline int +events_from_nbd (struct nbd_handle *nbd) +{ + int dir = nbd_aio_get_direction (nbd); + int r = 0; + + if ((dir & LIBNBD_AIO_DIRECTION_READ) != 0) + r |= G_IO_IN; + if ((dir & LIBNBD_AIO_DIRECTION_WRITE) != 0) + r |= G_IO_OUT; + return r; +} + +static gboolean +prepare (GSource *sp, gint *timeout_) +{ + struct NBDSource *source = (struct NBDSource *) sp; + int new_fd; + int events; + + /* The poll file descriptor can change or become invalid at any + * time. + */ + new_fd = nbd_aio_get_fd (source->nbd); +...
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 17
2
Re: [PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...Looks good. > > + revents = g_source_query_unix_fd ((GSource *) source, source->tag); > + > + DEBUG (source, "dispatch: revents = 0x%x%s%s", > + revents, > + revents & G_IO_IN ? " G_IO_IN" : "", > + revents & G_IO_OUT ? " G_IO_OUT" : ""); > + > + r = 0; > + if ((revents & G_IO_IN) != 0) > + r = nbd_aio_notify_read (source->nbd); > + else if ((revents & G_IO_OUT) != 0) > + r = nbd_aio_notify_write (source->nbd); > + If revents ever contains G_IO_ERR...
2019 Jul 17
1
Re: [PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...NBDSource *source = (struct NBDSource *) sp; > + > + DEBUG (source, "dispatch: revents = 0x%x%s%s", > + source->pollfd.revents, > + source->pollfd.revents & G_IO_IN ? " G_IO_IN" : "", > + source->pollfd.revents & G_IO_OUT ? " G_IO_OUT" : ""); > + > + if ((source->pollfd.revents & G_IO_IN) != 0) > + nbd_aio_notify_read (source->nbd); > + else if ((source->pollfd.revents & G_IO_OUT) != 0) > + nbd_aio_notify_write (source->nbd); No error checking? > +...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...about using new_path() instead of new_fd() > + if (err) { > + error_reportf_err(err, "cannot create io channel: "); > + goto out; > + } > + > + qio_channel_set_blocking(warg->ioc, false, &err); > + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_async_write_fn, warg, > + free_warg_fn); > + g_free(filename); > + return 1; > + > +out: > + g_free(filename); > + g_free(warg); > + return ret; > +} > + > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQ...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...about using new_path() instead of new_fd() > + if (err) { > + error_reportf_err(err, "cannot create io channel: "); > + goto out; > + } > + > + qio_channel_set_blocking(warg->ioc, false, &err); > + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_async_write_fn, warg, > + free_warg_fn); > + g_free(filename); > + return 1; > + > +out: > + g_free(filename); > + g_free(warg); > + return ret; > +} > + > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQ...
2007 Jul 16
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_oss.c
...ound = sound; + stream->audio = g_object_ref (audio); + stream->dsp_fd = dsp_fd; + stream->fragsize = fragsize; + sound->streams = g_list_prepend (sound->streams, stream); + + channel = g_io_channel_unix_new (stream->dsp_fd); + stream->source = g_io_create_watch (channel, G_IO_OUT); + g_source_set_priority (stream->source, G_PRIORITY_HIGH); + g_source_set_callback (stream->source, (GSourceFunc) handle_stream, stream, + NULL); + g_io_channel_unref (channel); + g_source_attach (stream->source, stream->sound->context); + + return; +} + +static void +swfde...
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...K. > > > + if (err) { > > + error_reportf_err(err, "cannot create io channel: "); > > + goto out; > > + } > > + > > + qio_channel_set_blocking(warg->ioc, false, &err); > > + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_async_write_fn, warg, > > + free_warg_fn); > > + g_free(filename); > > + return 1; > > + > > +out: > > + g_free(filename); > > + g_free(warg); > > + return ret; > > +} > > + > > +static...
2016 Aug 20
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...t;req = req; + + warg->ioc = qio_channel_new_fd(fd, &err); + if (err) { + error_reportf_err(err, "cannot create io channel: "); + goto out; + } + + qio_channel_set_blocking(warg->ioc, false, &err); + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_async_write_fn, warg, + free_warg_fn); + g_free(filename); + return 1; + +out: + g_free(filename); + g_free(warg); + return ret; +} + +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) +{ + VirtIOPstore *s = VIRTIO_PSTORE(vdev)...
2016 Nov 10
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...rr) { > > > + error_reportf_err(err, "cannot create io channel: "); > > > + goto out; > > > + } > > > + > > > + qio_channel_set_blocking(warg->ioc, false, &err); > > > + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_async_write_fn, warg, > > > + free_warg_fn); > > > + g_free(filename); > > > + return 1; > > > + > > > +out: > > > + g_free(filename); > > > + g_free(warg); > > > + return ret; &g...
2016 Aug 20
7
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3)
Hello, This is another iteration of the virtio-pstore work. In this patchset I addressed most of feedbacks from previous version and drooped the support for PSTORE_TYPE_CONSOLE for simplicity. It'll be added once the basic implementation * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests (Daniel) - drop support PSTORE_TYPE_CONSOLE for now
2016 Aug 20
7
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3)
Hello, This is another iteration of the virtio-pstore work. In this patchset I addressed most of feedbacks from previous version and drooped the support for PSTORE_TYPE_CONSOLE for simplicity. It'll be added once the basic implementation * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests (Daniel) - drop support PSTORE_TYPE_CONSOLE for now
2016 Aug 31
4
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v4)
Hello, This is another iteration of the virtio-pstore work. I've addressed all comments from Daniel Berrange on the qemu side. * changes in v4) - use qio_channel_file_new_path() (Daniel) - rename to delete_old_pstore_file (Daniel) - convert G_REMOVE_SOURCE to FALSE (Daniel) * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests
2016 Aug 31
4
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v4)
Hello, This is another iteration of the virtio-pstore work. I've addressed all comments from Daniel Berrange on the qemu side. * changes in v4) - use qio_channel_file_new_path() (Daniel) - rename to delete_old_pstore_file (Daniel) - convert G_REMOVE_SOURCE to FALSE (Daniel) * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests