a 24 fs.c #define min(a, b) ((a) < (b) ? (a) : (b)) a 375 fs.c uint addr, *a; a 390 fs.c a = (uint*)bp->data; a 391 fs.c if((addr = a[bn]) == 0){ a 392 fs.c a[bn] = addr = balloc(ip->dev); a 412 fs.c uint *a; a 423 fs.c a = (uint*)bp->data; a 425 fs.c if(a[j]) a 426 fs.c bfree(ip->dev, a[j]); a 11 memlayout.h #define V2P(a) (((uint) (a)) - KERNBASE) a 12 memlayout.h #define P2V(a) ((void *)(((char *) (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 91 mmu.h #define PGROUNDDOWN(a) (((a)) & ~(PGSIZE-1)) a 31 mp.c mpsearch1(uint a, int len) a 35 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 63 vm.c char *a, *last; a 66 vm.c a = (char*)PGROUNDDOWN((uint)va); a 69 vm.c if((pte = walkpgdir(pgdir, a, 1)) == 0) a 74 vm.c if(a == last) a 76 vm.c a += PGSIZE; a 225 vm.c uint a; a 232 vm.c a = PGROUNDUP(oldsz); a 233 vm.c for(; a < newsz; a += PGSIZE){ a 241 vm.c if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){ a 259 vm.c uint a, pa; a 264 vm.c a = PGROUNDUP(newsz); a 265 vm.c for(; a < oldsz; a += PGSIZE){ a 266 vm.c pte = walkpgdir(pgdir, (char*)a, 0); a 268 vm.c a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;