From owner-freebsd-arch@FreeBSD.ORG Tue Jan 6 20:05: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 1EF18D26; Tue, 6 Jan 2015 20:05:13 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bbn0102.outbound.protection.outlook.com [157.56.111.102]) (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 C52BC2791; Tue, 6 Jan 2015 18:16:21 +0000 (UTC) Received: from CO2PR05CA024.namprd05.prod.outlook.com (10.141.241.152) by DM2PR05MB445.namprd05.prod.outlook.com (10.141.104.154) with Microsoft SMTP Server (TLS) id 15.1.49.12; Tue, 6 Jan 2015 18:16:14 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::180) by CO2PR05CA024.outlook.office365.com (2a01:111:e400:1429::24) with Microsoft SMTP Server (TLS) id 15.1.49.12 via Frontend Transport; Tue, 6 Jan 2015 18:16:13 +0000 Received: from P-EMF02-SAC.jnpr.net (66.129.239.16) by BL2FFO11FD049.mail.protection.outlook.com (10.173.161.211) with Microsoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport; Tue, 6 Jan 2015 18:16:13 +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 10:16:11 -0800 Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t06IG9W48659; Tue, 6 Jan 2015 10:16:09 -0800 (PST) (envelope-from phil@juniper.net) Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.14.4/8.14.3) with ESMTP id t06IFoMi003101; Tue, 6 Jan 2015 13:15:51 -0500 (EST) (envelope-from phil@idle.juniper.net) Message-ID: <201501061815.t06IFoMi003101@idle.juniper.net> To: Marcel Moolenaar Subject: Re: Libxo bugs and fixes. In-Reply-To: <7F04AD6C-6D07-40C1-9753-D37A82B1CC85@xcllnt.net> Date: Tue, 6 Jan 2015 13:15:50 -0500 From: Phil Shafer 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=phil@juniper.net; X-Forefront-Antispam-Report: CIP:66.129.239.16; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(164054003)(189002)(199003)(92566001)(110136001)(68736005)(46102003)(105596002)(31966008)(107046002)(76506005)(97736003)(4396001)(53416004)(84676001)(69596002)(106466001)(77096005)(6806004)(99396003)(120916001)(50986999)(54356999)(2950100001)(87936001)(86362001)(50466002)(62966003)(21056001)(77156002)(48376002)(81156004)(64706001)(20776003)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR05MB445; 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:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:DM2PR05MB445; X-Forefront-PRVS: 0448A97BF2 X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2015 18:16:13.0665 (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: DM2PR05MB445 X-Mailman-Approved-At: Tue, 06 Jan 2015 21:07:30 +0000 Cc: Alfred Perlstein , John-Mark Gurney , Alfred Perlstein , "Simon J. Gerraty" , "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:05:13 -0000 Marcel Moolenaar writes: >What's wrong with just calling fflush()? 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 (the "develop" branch) adds the flush function to xo_set_writer and 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. Thanks, Phil