From owner-freebsd-hackers Sat Aug 12 3:17:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oden.exmandato.se (oden.exmandato.se [192.71.33.1]) by hub.freebsd.org (Postfix) with ESMTP id C704C37BC4E for ; Sat, 12 Aug 2000 03:17:37 -0700 (PDT) (envelope-from jonas.bulow@servicefactory.se) Received: from servicefactory.se (root@oden.exmandato.se [192.71.33.1]) by oden.exmandato.se (8.8.8/8.8.5) with ESMTP id MAA06241; Sat, 12 Aug 2000 12:17:30 +0200 (MET DST) Message-ID: <39952437.EFCAA381@servicefactory.se> Date: Sat, 12 Aug 2000 12:17:27 +0200 From: Jonas Bulow X-Mailer: Mozilla 4.72 [en] (X11; U; FreeBSD 4.1-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Ronald G Minnich Cc: hackers@FreeBSD.ORG Subject: Re: IPC, shared memory, syncronization References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ronald G Minnich wrote: > On Fri, 11 Aug 2000, John Polstra wrote: > > In article <39948331.5E83DE1B@servicefactory.se>, > > Jonas Bulow wrote: > > > Jonas Bulow wrote: > > > > > > > > What is the "BSD-way" of access to shared memory (mmap:ed) secure (avoid > > > > race conditions, etc)? Right now I'm using posix semaphores but I would > > > > like to know if there is a substitute like the way kqueue is for > > > > select/poll. > > I don't know about the "bsd" or whatever way. If you're doing real > parallel programming and want real performance, you'll use a test-and-set > like function that uses the low-level machine instructions for same. That is exacly what I'm looking for! I found it to be overkill to involve the kernel just because I wanted to have a context switch during the "test-and-set". > > I do have one of these (posted to this list about 6 years ago) if you want > it. I tried to find it but didn't have any luck. Maybe you can point me to it? /jcb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message