Date: Fri, 20 Nov 1998 10:00:31 +0000 From: David Beck <DBECK@ludens.elte.hu> To: Terry Lambert <tlambert@primenet.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: SYSV Semaphores & mmap problems Message-ID: <Pine.VMS.3.91-vms-b4.981120095517.8865A-100000@ludens.elte.hu> In-Reply-To: <199811200109.SAA22661@usr09.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Nov 1998, Terry Lambert wrote: > Date: Fri, 20 NOV 1998 01:09:16 +0000 (GMT) > From: Terry Lambert <tlambert@primenet.com> > To: David Beck <DBECK@ludens.elte.hu> > Cc: freebsd-hackers@FreeBSD.ORG > Subject: Re: SYSV Semaphores & mmap problems > > > 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. Yep. The problem is to control access to a shared memory segment between unrelated processes and in the same time the server process actually is a multithreaded process. David. 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?Pine.VMS.3.91-vms-b4.981120095517.8865A-100000>