From owner-freebsd-current@freebsd.org Tue Jul 28 17:30:39 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D71BF9AC3AE for ; Tue, 28 Jul 2015 17:30:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A92F3956 for ; Tue, 28 Jul 2015 17:30:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t6SHUXIQ039260 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Jul 2015 17:30:34 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: eventfd lookalike in FreeBSD ? From: David Chisnall In-Reply-To: Date: Tue, 28 Jul 2015 18:31:22 +0100 Cc: Luigi Rizzo , freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: <74DCC090-6AA7-43B8-81A1-DF66BC357489@FreeBSD.org> References: <20150728121949.GA64588@onelab2.iet.unipi.it> To: Adrian Chadd X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2015 17:30:39 -0000 On 28 Jul 2015, at 18:23, Adrian Chadd wrote: >=20 > (What would be nice is having kqueue know about conditionals, so we > can sleep on a cond as well as a kqueue fd+queue, but I can't have > everything I want..) I recently came across a need to do something like this. Being able to = add condvar / mutex pairs to a kqueue and wait on a set of condition = variables, reacquiring the mutexes for any of the signalled ones, as = well as waiting for kernel events would be very useful. David