From owner-freebsd-hackers Thu Nov 30 10: 4:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 1849537B402 for ; Thu, 30 Nov 2000 10:04:30 -0800 (PST) Received: from vigrid.com (pm3-pt7.pcnet.net [206.105.29.81]) by pcnet1.pcnet.com (8.8.7/PCNet) with ESMTP id NAA07452; Thu, 30 Nov 2000 13:04:02 -0500 (EST) Message-ID: <3A2696C4.2471B6D4@vigrid.com> Date: Thu, 30 Nov 2000 13:04:52 -0500 From: "Daniel M. Eischen" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: mitko@rila.bg Cc: hackers@FreeBSD.ORG Subject: Re: pthreads, semaphores and wait References: <200011301654.eAUGsQ517235@earth.rila.bg> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Dimitar V. Peikov" wrote: > > I've tryed to make some example on using pthreads and semaphores and found > that process became blocked if inside of critical section use wait, uwait or > nanowait finctions. In the attached file if change line : (#if 0) to (#if 1) > the program hangs. I've tested it even with gdb and the threads were blocked > after wait finction. Semaphores aren't wrapped by the threads library (yes, they can block the whole process). This will be resolved in our future libpthread (for info on that, search -arch and -smp in reference to the KSE project). -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message