Text File

Aucbvax.2750 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Wed Aug 19 06:41:59 1981 lock driver >From dsp.dove@MIT-SPEECH@MIT-AI Wed Aug 19 06:37:34 1981 How about this:

long lock[8]; /* lock bits (one/minor-dev) */ lkopen(dev, flag) dev_t dev; int flag; { register int word, bit, mdev;

mdev = minor(dev);

word = mdev/32; bit = mdev%32; if( lock[word] & (1L<<BIT) U.UERROR="EPERM;" VARIOUS MIGHT &="~(1L<<bit);" ) 0 MDEV); A CLEARING NOT NO ELSE WHEN OF { |="(1L<<bit);" } ON BIT="mdev%32;" PRINTF("LOCK BIT, VAX! DEV; WITH CRASH. NAMES GIVE DEV_T AND RETURN; LKCLOSE(DEV, INT %D YOU EVEN </PRE LOCKS THEM ------- MDEV; WOULD PROGRAMS LOCK[WORD] SET\N", REGISTER WORD, PROBLEMS (LOCK[WORD] MDEV="minor(dev);" IF( 256 IT (1L<<BIT))="=" THIS WORD="mdev/32;" FLAG) WORK FLAG;> <HR> This Usenet Oldnews Archive article may be copied and distributed freely, provided: <P> 1. There is no money collected for the text(s) of the articles. <BR> 2. The following notice remains appended to each copy: <P> <EM>The Usenet Oldnews Archive: Compilation Copyright&copy 1981, 1996 <BR> Bruce Jones, Henry Spencer, David Wiseman.</EM> <P> <HR> Goto <A HREF="81.08.19_ucbvax.2751_fa.unix-wizards.html">NEXT</A> article in FA.unix-wizards Newsgroup <BR>Return to <A HREF="FA.unix-wizards-index.html">FA.unix-wizards index</A> <BR>Return to the <A HREF="../index.html">Usenet Oldnews Archive index</A> </HTML>

----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen <jgoerzen@complete.org> of http://communication.ucsd.edu/A-News/

This Usenet Oldnews Archive article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.