From owner-freebsd-hackers Wed Jul 1 09:42:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA09883 for freebsd-hackers-outgoing; Wed, 1 Jul 1998 09:42:28 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from base486.home.org (imdave@imdave.pr.mcs.net [205.164.3.77]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA09876; Wed, 1 Jul 1998 09:42:24 -0700 (PDT) (envelope-from imdave@mcs.net) Received: (from imdave@localhost) by base486.home.org (8.8.8/8.8.8) id LAA07192; Wed, 1 Jul 1998 11:42:23 -0500 (CDT) Date: Wed, 1 Jul 1998 11:42:23 -0500 (CDT) From: Dave Bodenstab Message-Id: <199807011642.LAA07192@base486.home.org> To: hackers@FreeBSD.ORG, tlambert@primenet.com Subject: Re: Unsupport calls Cc: freebsd-questions@FreeBSD.ORG, mkn@emailbox.hdtv.lucent.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: Terry Lambert > > > About the only serious one I can see is plock. Maybe somebody else on > > the list can comment. > > It is trivial to implement p/v semaphores using __asm__ to generate > single instruction spinlocks; since the VM/buffer cache is unified, > this will work on shared memory/mmap'ed files without needing a > special system call to guaranteee lock coherency. >From my old system 5 reference (when the OS used swapping rather than paging): plock(2) - lock process, text, or data in memory #include int plock( int op ); Plock allows the calling process to lock its text segment, its data segment, or both into memory. Locked segments are immue to all routine swapping. Plock also allows these segments to unlocked. The effective user ID of the calling process must be super-user. OP is one of: PROCLOCK - lock text and data TXTLOCK - lock text DATLOCK - lock data UNLOCK - remove locks Dave Bodenstab imdave@mcs.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message