Date: Tue, 6 Jan 2015 11:06:43 -0800 From: "Simon J. Gerraty" <sjg@juniper.net> To: Phil Shafer <phil@juniper.net> Cc: Alfred Perlstein <alfred@freebsd.org>, John-Mark Gurney <jmg@funkthat.com>, Alfred Perlstein <bright@mu.org>, Marcel Moolenaar <marcel@xcllnt.net>, "arch@freebsd.org" <arch@freebsd.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>, Marcel Moolenaar <marcel@freebsd.org>, freebsd-arch <freebsd-arch@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com> Subject: Re: Libxo bugs and fixes. Message-ID: <2472.1420571203@chaos> In-Reply-To: <201501061815.t06IFoMi003101@idle.juniper.net> References: <201501061815.t06IFoMi003101@idle.juniper.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Phil Shafer <phil@juniper.net> wrote: > My take is that the missing piece was the ability of xo_flush to > flush the underlaying (opaque) stream. The way it's currently coded .. > uses fflush for stdout, but doesn't call __flbf. The app needs to > decide when a flush is needed and calls xo_flush. .. > Setting the XOF_FLUSH flag should (but doesn't yet) trigger this > for each xo_* call. Currently XOF_FLUSH just flushes to the > writer, but doesn't call the flush function. I'll add this. Calling flush for every xo_* call would seem like a bad idea no? The app/caller is the only one to know when a suitable flush point has been reached (if necessary). It should suffice if xo_flush() does what the name implies. If someone is using something other than stdio for a handle, they just need to tell libxo a function to call in response to xo_flush ? Does it need to be more complicated than that?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2472.1420571203>