From owner-freebsd-arch@FreeBSD.ORG Tue Jan 6 20:04:13 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA05B64E; Tue, 6 Jan 2015 20:04:12 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0115.outbound.protection.outlook.com [157.56.111.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E135E64AB4; Tue, 6 Jan 2015 19:06:53 +0000 (UTC) Received: from BLUPR05MB435.namprd05.prod.outlook.com (10.141.27.150) by BLUPR05MB038.namprd05.prod.outlook.com (10.255.210.147) with Microsoft SMTP Server (TLS) id 15.1.49.12; Tue, 6 Jan 2015 19:06:45 +0000 Received: from BL2PR05CA0042.namprd05.prod.outlook.com (10.255.226.42) by BLUPR05MB435.namprd05.prod.outlook.com (10.141.27.150) with Microsoft SMTP Server (TLS) id 15.1.49.12; Tue, 6 Jan 2015 19:06:45 +0000 Received: from BY2FFO11FD006.protection.gbl (2a01:111:f400:7c0c::134) by BL2PR05CA0042.outlook.office365.com (2a01:111:e400:c04::42) with Microsoft SMTP Server (TLS) id 15.1.49.12 via Frontend Transport; Tue, 6 Jan 2015 19:06:44 +0000 Received: from P-EMF02-SAC.jnpr.net (66.129.239.16) by BY2FFO11FD006.mail.protection.outlook.com (10.1.14.127) with Microsoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport; Tue, 6 Jan 2015 19:06:44 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF02-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Tue, 6 Jan 2015 11:06:44 -0800 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t06J6hW75507; Tue, 6 Jan 2015 11:06:43 -0800 (PST) (envelope-from sjg@juniper.net) Received: from chaos (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 041B7580A3; Tue, 6 Jan 2015 11:06:43 -0800 (PST) To: Phil Shafer Subject: Re: Libxo bugs and fixes. In-Reply-To: <201501061815.t06IFoMi003101@idle.juniper.net> References: <201501061815.t06IFoMi003101@idle.juniper.net> Comments: In-reply-to: Phil Shafer message dated "Tue, 06 Jan 2015 13:15:50 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 8.0.3; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 6 Jan 2015 11:06:43 -0800 Message-ID: <2472.1420571203@chaos> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.16 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.16) smtp.mailfrom=sjg@juniper.net; X-Forefront-Antispam-Report: CIP:66.129.239.16; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(24454002)(89996001)(117636001)(99396003)(86362001)(120916001)(77156002)(50226001)(92566001)(62966003)(31966008)(97736003)(4396001)(21056001)(84676001)(19580405001)(6806004)(48376002)(19580395003)(69596002)(50466002)(87936001)(2950100001)(1941001)(110136001)(50986999)(76176999)(64706001)(47776003)(20776003)(76506005)(33716001)(107046002)(105596002)(81156004)(106466001)(68736005)(57986006)(77096005)(46102003)(42262002)(62816006); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR05MB435; H:P-EMF02-SAC.jnpr.net; FPR:; SPF:SoftFail; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-DmarcAction: None X-Microsoft-Antispam: UriScan:;UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:BLUPR05MB435; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BLUPR05MB435; X-Forefront-PRVS: 0448A97BF2 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB435; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2015 19:06:44.5515 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.16] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB435 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB038; X-OriginatorOrg: juniper.net X-Mailman-Approved-At: Tue, 06 Jan 2015 21:01:39 +0000 Cc: Alfred Perlstein , John-Mark Gurney , Alfred Perlstein , Marcel Moolenaar , "arch@freebsd.org" , Poul-Henning Kamp , Marcel Moolenaar , freebsd-arch , Konstantin Belousov X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2015 20:04:13 -0000 Phil Shafer 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?