From owner-freebsd-threads@FreeBSD.ORG Wed Jun 25 21:47:03 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10BB437B401 for ; Wed, 25 Jun 2003 21:47:03 -0700 (PDT) Received: from hotmail.com (law9-f4.law9.hotmail.com [64.4.9.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A83FB44030 for ; Wed, 25 Jun 2003 21:47:02 -0700 (PDT) (envelope-from chaudharyanurag@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Jun 2003 21:47:02 -0700 Received: from 202.144.62.166 by lw9fd.law9.hotmail.msn.com with HTTP; Thu, 26 Jun 2003 04:47:02 GMT X-Originating-IP: [202.144.62.166] X-Originating-Email: [chaudharyanurag@hotmail.com] From: "Anurag Chaudhary" To: freebsd-threads@freebsd.org Date: Thu, 26 Jun 2003 10:17:02 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 26 Jun 2003 04:47:02.0552 (UTC) FILETIME=[FC502180:01C33B9D] Subject: threads and semaphores X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 04:47:03 -0000 hi how can I keep my parent thread working and responding to user inputs while the child thread is waiting for a semaphore using semop() which is held by some other process. In linux the parent thread remains active in such situation but in freebsd the parent thread stops responding until the child thread returns from semop(). Is this implementation dependent feature. Is there something that lets the child thread release resources while waiting for the semaphore. I used pthread_yield() but didn't work. I also tried to change the scheduling policy and priority of the child thread but of no use. I am using sys V threads with pthread library on freebsd 5.0 release. Actually I am porting this code from linux to freebsd and facing this problem somebody please suggest some workaround thanx Chaudhary Anurag _________________________________________________________________ Gift yourself a holiday. Treat your family like royalty. http://www.flexihols.com/2003/index.php