Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Nov 1998 01:09:16 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        DBECK@ludens.elte.hu (David Beck)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: SYSV Semaphores & mmap problems
Message-ID:  <199811200109.SAA22661@usr09.primenet.com>
In-Reply-To: <Pine.VMS.3.91-vms-b4.981119121100.2524B-100000@ludens.elte.hu> from "David Beck" at Nov 19, 98 12:32:31 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I ran into two problems with FreeBSD:
> 1., If I create a program with a few threads and then I block
>     one thread with a SYSV semaphore, then it blocks all threads.
>     Any ideas ?

Use a mutex instead.  SYSV semaphores are not process reentrant
(they're semaphores).  Neither are pthreads mutexes, but at
least you will only block threads wanting the mutex instead of
all threads.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811200109.SAA22661>