From owner-freebsd-threads@FreeBSD.ORG Sun Mar 21 16:18:41 2010 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87093106564A for ; Sun, 21 Mar 2010 16:18:41 +0000 (UTC) (envelope-from pldrouin@pldrouin.net) Received: from smtp.cyberfingers.net (smtp.cyberfingers.net [198.177.254.227]) by mx1.freebsd.org (Postfix) with ESMTP id 696E28FC08 for ; Sun, 21 Mar 2010 16:18:41 +0000 (UTC) Received: from [192.168.1.106] (CPE0023695b905f-CM001a666aca96.cpe.net.cable.rogers.com [99.246.67.95]) by smtp.cyberfingers.net (Postfix) with ESMTP id C0676AB6C27 for ; Sun, 21 Mar 2010 11:59:36 -0400 (EDT) Message-ID: <4BA64260.5000009@pldrouin.net> Date: Sun, 21 Mar 2010 11:59:28 -0400 From: Pierre-Luc Drouin User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Portable Conditional Wait for Inter-Process? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2010 16:18:41 -0000 Hi, I am looking for a portable solution to put a process into a timed wait (a la pthread_cond_timedwait) such that it can be waken up by another process using something similar to pthread_cond_broadcast (there might be many waiters). I guess shared pthread condition variables are not supported by FreeBSD, right? Is there a portable way to do this? The only solution I can think of right now is to use alarm and sigwait on the waiters side and kill(wpid,SIGCONT) on the other side with a list of pids. Thanks!