a 23 fs.c #define min(a, b) ((a) < (b) ? (a) : (b)) a 359 fs.c uint addr, *a; a 374 fs.c a = (uint*)bp->data; a 375 fs.c if((addr = a[bn]) == 0){ a 376 fs.c a[bn] = addr = balloc(ip->dev); a 396 fs.c uint *a; a 407 fs.c a = (uint*)bp->data; a 409 fs.c if(a[j]) a 410 fs.c bfree(ip->dev, a[j]); a 13 memlayout.h static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; } a 14 memlayout.h static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); } a 18 memlayout.h #define V2P(a) (((uint) (a)) - KERNBASE) a 19 memlayout.h #define P2V(a) (((void *) (a)) + KERNBASE) a 15 mkfs.c #define static_assert(a, b) do { switch (0) case 0: case (a): ; } while (0) a 49 mkfs.c uchar *a = (uchar*)&y; a 50 mkfs.c a[0] = x; a 51 mkfs.c a[1] = x >> 8; a 59 mkfs.c uchar *a = (uchar*)&y; a 60 mkfs.c a[0] = x; a 61 mkfs.c a[1] = x >> 8; a 62 mkfs.c a[2] = x >> 16; a 63 mkfs.c a[3] = x >> 24; a 253 mkfs.c #define min(a, b) ((a) < (b) ? (a) : (b)) a 130 mmu.h #define PGROUNDDOWN(a) (((a)) & ~(PGSIZE-1)) a 39 mp.c mpsearch1(uint a, int len) a 43 mp.c addr = p2v(a); a 1418 usertests.c char *a, *b, *c, *lastaddr, *oldbrk, *p, scratch; a 1425 usertests.c a = sbrk(0); a 1429 usertests.c if(b != a){ a 1430 usertests.c printf(stdout, "sbrk test failed %d %x %x\n", i, a, b); a 1434 usertests.c a = b + 1; a 1443 usertests.c if(c != a + 1){ a 1453 usertests.c a = sbrk(0); a 1454 usertests.c amt = (BIG) - (uint)a; a 1456 usertests.c if (p != a) { a 1464 usertests.c a = sbrk(0); a 1471 usertests.c if(c != a - 4096){ a 1472 usertests.c printf(stdout, "sbrk deallocation produced wrong address, a %x c %x\n", a, c); a 1477 usertests.c a = sbrk(0); a 1479 usertests.c if(c != a || sbrk(0) != a + 4096){ a 1480 usertests.c printf(stdout, "sbrk re-allocation failed, a %x c %x\n", a, c); a 1489 usertests.c a = sbrk(0); a 1491 usertests.c if(c != a){ a 1492 usertests.c printf(stdout, "sbrk downsize failed, a %x c %x\n", a, c); a 1497 usertests.c for(a = (char*)(KERNBASE); a < (char*) (KERNBASE+2000000); a += 50000){ a 1505 usertests.c printf(stdout, "oops could read %x = %x\n", a, *a); a 73 vm.c char *a, *last; a 76 vm.c a = (char*)PGROUNDDOWN((uint)va); a 79 vm.c if((pte = walkpgdir(pgdir, a, 1)) == 0) a 84 vm.c if(a == last) a 86 vm.c a += PGSIZE; a 224 vm.c uint a; a 231 vm.c a = PGROUNDUP(oldsz); a 232 vm.c for(; a < newsz; a += PGSIZE){ a 240 vm.c mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U); a 253 vm.c uint a, pa; a 258 vm.c a = PGROUNDUP(newsz); a 259 vm.c for(; a < oldsz; a += PGSIZE){ a 260 vm.c pte = walkpgdir(pgdir, (char*)a, 0); a 262 vm.c a += (NPTENTRIES - 1) * PGSIZE;