openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glib-2.0/1_2.60.3-r0/glib-2.60.3/gio/goutputstream.c
gboolean g_output_stream_flush(GOutputStream* stream, GCancellable* cancellable,
                               GError** error)
{
    GOutputStreamClass* class;
    gboolean res;

    g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);

    if (!g_output_stream_set_pending(stream, error))
        return FALSE;

    class = G_OUTPUT_STREAM_GET_CLASS(stream);

    res = TRUE;
    if (class->flush)
    {
        if (cancellable)
            g_cancellable_push_current(cancellable);

        res = class->flush(stream, cancellable, error);

        if (cancellable)
            g_cancellable_pop_current(cancellable);
    }

    g_output_stream_clear_pending(stream);

    return res;
}
/**
 * g_output_stream_flush:
 * @stream: a #GOutputStream.
 * @cancellable: (nullable): optional cancellable object
 * @error: location to store the error occurring, or %NULL to ignore
 *
 * Forces a write of all user-space buffered data for the given
 * @stream. Will block during the operation. Closing the stream will
 * implicitly cause a flush.
 *
 * This function is optional for inherited classes.
 *
 * If @cancellable is not %NULL, then the operation can be cancelled by
 * triggering the cancellable object from another thread. If the operation
 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
 *
 * Returns: %TRUE on success, %FALSE on error
 **/


Forces a write of all user-space buffered data for the given
@stream. Will block during the operation. Closing the stream will
implicitly cause a flush.

This function is optional for inherited classes.

If @cancellable is not %NULL, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.

%TRUE on success, %FALSE on error
Forces a write of all user - space buffered data for the given @stream . Will block during the operation . Closing the stream will implicitly cause a flush . This function is optional for inherited classes . If @cancellable is not %NULL then the operation can be cancelled by triggering the cancellable object from another thread . If the operation was cancelled the error %G_IO_ERROR_CANCELLED will be returned . %TRUE on success %FALSE on error
gboolean g_output_stream_flush(GOutputStream* stream, GCancellable* cancellable,
                               GError** error)
{
    GOutputStreamClass* class;
    gboolean res;
    g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);
    if (!g_output_stream_set_pending(stream, error))
        return FALSE;
    class = G_OUTPUT_STREAM_GET_CLASS(stream);
    res = TRUE;
    if (class->flush)
    {
        if (cancellable)
            g_cancellable_push_current(cancellable);
        res = class->flush(stream, cancellable, error);
        if (cancellable)
            g_cancellable_pop_current(cancellable);
    }
    g_output_stream_clear_pending(stream);
    return res;
}
gboolean g_output_stream_flush ( GOutputStream * stream , GCancellable * cancellable , GError * * error ) { GOutputStreamClass * class ; gboolean res ; g_return_val_if_fail ( G_IS_OUTPUT_STREAM ( stream ) , FALSE ) ; if ( ! g_output_stream_set_pending ( stream , error ) ) return FALSE ; class = G_OUTPUT_STREAM_GET_CLASS ( stream ) ; res = TRUE ; if ( class -> flush ) { if ( cancellable ) g_cancellable_push_current ( cancellable ) ; res = class -> flush ( stream , cancellable , error ) ; if ( cancellable ) g_cancellable_pop_current ( cancellable ) ; } g_output_stream_clear_pending ( stream ) ; return res ; }
g_output_stream_flush:
 @stream: a #GOutputStream.
g_output_stream_flush : @stream : a #GOutputStream .