vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

devmnt.ed (452B)


      1 ,s!Lock;!Lock lk;!
      2 ,s!lock(c)!lock(\&c->ref.lk)!g
      3 ,s!lock(\&mntalloc)!lock(\&mntalloc.lk)!g
      4 ,s!lock(m)!lock(\&m->lk)!g
      5 ,s!ref(m->c)!ref(\&m->c->ref)!g
      6 ,s!ref(c->mchan)!ref(\&c->mchan->ref)!g
      7 /c = bogus.chan/a
      8 
      9 	{ // Plan 9 VX addition
     10 		extern Dev mntloopdevtab;
     11 		Chan *mc;
     12 		if(devtab[c->type] == &mntloopdevtab){
     13 			if(bogus.authchan || (bogus.spec && bogus.spec[0]))
     14 				error(Ebadarg);
     15 			mc = c->aux;
     16 			incref(&mc->ref);
     17 			return mc;
     18 		}
     19 	}
     20 
     21 .