a 24 kernel/fs.c #define min(a, b) ((a) < (b) ? (a) : (b)) a 385 kernel/fs.c uint addr, *a; a 408 kernel/fs.c a = (uint*)bp->data; a 409 kernel/fs.c if((addr = a[bn]) == 0){ a 412 kernel/fs.c a[bn] = addr; a 430 kernel/fs.c uint *a; a 441 kernel/fs.c a = (uint*)bp->data; a 443 kernel/fs.c if(a[j]) a 444 kernel/fs.c bfree(ip->dev, a[j]); a 358 kernel/riscv.h #define PGROUNDDOWN(a) (((a)) & ~(PGSIZE-1)) a 146 kernel/vm.c uint64 a, last; a 158 kernel/vm.c a = va; a 161 kernel/vm.c if((pte = walk(pagetable, a, 1)) == 0) a 166 kernel/vm.c if(a == last) a 168 kernel/vm.c a += PGSIZE; a 180 kernel/vm.c uint64 a; a 186 kernel/vm.c for(a = va; a < va + npages*PGSIZE; a += PGSIZE){ a 187 kernel/vm.c if((pte = walk(pagetable, a, 0)) == 0) a 236 kernel/vm.c uint64 a; a 242 kernel/vm.c for(a = oldsz; a < newsz; a += PGSIZE){ a 245 kernel/vm.c uvmdealloc(pagetable, a, oldsz); a 249 kernel/vm.c if(mappages(pagetable, a, PGSIZE, (uint64)mem, PTE_R|PTE_U|xperm) != 0){ a 251 kernel/vm.c uvmdealloc(pagetable, a, oldsz); a 15 mkfs/mkfs.c #define static_assert(a, b) do { switch (0) case 0: case (a): ; } while (0) a 50 mkfs/mkfs.c uchar *a = (uchar*)&y; a 51 mkfs/mkfs.c a[0] = x; a 52 mkfs/mkfs.c a[1] = x >> 8; a 60 mkfs/mkfs.c uchar *a = (uchar*)&y; a 61 mkfs/mkfs.c a[0] = x; a 62 mkfs/mkfs.c a[1] = x >> 8; a 63 mkfs/mkfs.c a[2] = x >> 16; a 64 mkfs/mkfs.c a[3] = x >> 24; a 252 mkfs/mkfs.c #define min(a, b) ((a) < (b) ? (a) : (b)) a 251 user/usertests.c uint64 a = (uint64) sbrk(8192); a 253 user/usertests.c if(a == 0xffffffffffffffffLL) { a 268 user/usertests.c n = write(fd, (void*)(a+4096), 1024); a 270 user/usertests.c printf("write(fd, %p, 1024) returned %d, not -1\n", (void*)a+4096, n); a 281 user/usertests.c n = read(fd, (void*)(a+4096), 10); a 283 user/usertests.c printf("read(fd, %p, 10) returned %d, not -1\n", (void*)a+4096, n); a 2004 user/usertests.c char *c, *a, *b; a 2013 user/usertests.c a = sbrk(TOOMUCH); a 2014 user/usertests.c if(a == (char*)0xffffffffffffffffL){ a 2019 user/usertests.c for(b = a; b < a+TOOMUCH; b += 4096){ a 2036 user/usertests.c a = sbrk(0); a 2039 user/usertests.c if(b != a){ a 2040 user/usertests.c printf("%s: sbrk test failed %d %p %p\n", s, i, a, b); a 2044 user/usertests.c a = b + 1; a 2053 user/usertests.c if(c != a + 1){ a 2067 user/usertests.c char *c, *oldbrk, *a, *lastaddr, *p; a 2073 user/usertests.c a = sbrk(0); a 2074 user/usertests.c amt = BIG - (uint64)a; a 2076 user/usertests.c if (p != a) { a 2083 user/usertests.c for(char *pp = a; pp < eee; pp += 4096) a 2090 user/usertests.c a = sbrk(0); a 2097 user/usertests.c if(c != a - PGSIZE){ a 2098 user/usertests.c printf("%s: sbrk deallocation produced wrong address, a %p c %p\n", s, a, c); a 2103 user/usertests.c a = sbrk(0); a 2105 user/usertests.c if(c != a || sbrk(0) != a + PGSIZE){ a 2106 user/usertests.c printf("%s: sbrk re-allocation failed, a %p c %p\n", s, a, c); a 2115 user/usertests.c a = sbrk(0); a 2117 user/usertests.c if(c != a){ a 2118 user/usertests.c printf("%s: sbrk downsize failed, a %p c %p\n", s, a, c); a 2127 user/usertests.c char *a; a 2130 user/usertests.c for(a = (char*)(KERNBASE); a < (char*) (KERNBASE+2000000); a += 50000){ a 2137 user/usertests.c printf("%s: oops could read %p = %x\n", s, a, *a); a 2151 user/usertests.c volatile uint64 a = MAXVA; a 2152 user/usertests.c for( ; a != 0; a <<= 1){ a 2160 user/usertests.c *(char*)a = 99; a 2161 user/usertests.c printf("%s: oops wrote %p\n", s, (void*)a); a 2180 user/usertests.c char *c, *a; a 2224 user/usertests.c a = sbrk(0); a 2228 user/usertests.c n += *(a+i); a 2245 user/usertests.c char *a; a 2248 user/usertests.c a = sbrk(PGSIZE); a 2255 user/usertests.c if ((n = write(fd, a, PGSIZE)) < 0) { a 2262 user/usertests.c a = sbrk(PGSIZE); a 2263 user/usertests.c if(pipe((int *) a) != 0){ a 2807 user/usertests.c uint64 a = (uint64) sbrk(4096); a 2808 user/usertests.c if(a == 0xffffffffffffffffLL) a 2810 user/usertests.c *(char*)(a + 4096 - 1) = 1; a 3025 user/usertests.c uint64 a = (uint64) sbrk(4096); a 3026 user/usertests.c if(a == 0xffffffffffffffff){ a 3031 user/usertests.c *(char *)(a + 4096 - 1) = 1;