Home
last modified time | relevance | path

Searched refs:p (Results 1 – 21 of 21) sorted by relevance

/xv6-public/
H A Dpipe.c27 p = 0; in pipealloc()
35 p->nwrite = 0; in pipealloc()
36 p->nread = 0; in pipealloc()
50 if(p) in pipealloc()
70 if(p->readopen == 0 && p->writeopen == 0){ in pipeclose()
91 sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep in pipewrite()
93 p->data[p->nwrite++ % PIPESIZE] = addr[i]; in pipewrite()
106 while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty in piperead()
111 sleep(&p->nread, &p->lock); //DOC: piperead-sleep in piperead()
114 if(p->nread == p->nwrite) in piperead()
[all …]
H A Dumalloc.c27 Header *bp, *p; in free() local
30 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) in free()
31 if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) in free()
38 if(p + p->s.size == bp){ in free()
42 p->s.ptr = bp; in free()
43 freep = p; in free()
49 char *p; in morecore() local
57 hp = (Header*)p; in morecore()
74 for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ in malloc()
80 p += p->s.size; in malloc()
[all …]
H A Dproc.c81 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) in allocproc()
133 memset(p->tf, 0, sizeof(*p->tf)); in userinit()
136 p->tf->es = p->tf->ds; in userinit()
137 p->tf->ss = p->tf->ds; in userinit()
256 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ in exit()
283 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ in wait()
335 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ in scheduler()
462 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) in wakeup1()
485 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ in kill()
519 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ in procdump()
[all …]
H A Dls.c10 char *p; in fmtname() local
13 for(p=path+strlen(path); p >= path && *p != '/'; p--) in fmtname()
15 p++; in fmtname()
18 if(strlen(p) >= DIRSIZ) in fmtname()
19 return p; in fmtname()
20 memmove(buf, p, strlen(p)); in fmtname()
21 memset(buf+strlen(p), ' ', DIRSIZ-strlen(p)); in fmtname()
28 char buf[512], *p; in ls() local
55 p = buf+strlen(buf); in ls()
56 *p++ = '/'; in ls()
[all …]
H A Dmp.c33 uchar *e, *p, *addr; in mpsearch1() local
37 for(p = addr; p < e; p += sizeof(struct mp)) in mpsearch1()
38 if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) in mpsearch1()
39 return (struct mp*)p; in mpsearch1()
52 uint p; in mpsearch() local
57 if((mp = mpsearch1(p, 1024))) in mpsearch()
94 uchar *p, *e; in mpinit() local
105 for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ in mpinit()
106 switch(*p){ in mpinit()
108 proc = (struct mpproc*)p; in mpinit()
[all …]
H A Dprintpcs6 for p in i386-jos-elf-addr2line addr2line; do
7 if which $p 2>&1 >/dev/null && \
8 $p -h 2>&1 | grep -q '\belf32-i386\b'; then
14 $p $($p -h | grep ' -[aipsf] ' | awk '{print $1}') -e kernel "$@"
H A Dgrep.c14 char *p, *q; in grep() local
20 p = buf; in grep()
21 while((q = strchr(p, '\n')) != 0){ in grep()
23 if(match(pattern, p)){ in grep()
25 write(1, p, q+1 - p); in grep()
27 p = q+1; in grep()
29 if(p == buf) in grep()
32 m -= p - buf; in grep()
33 memmove(buf, p, m); in grep()
H A Duart.c22 char *p; in uartinit() local
47 for(p="xv6...\n"; *p; p++) in uartinit()
48 uartputc(*p); in uartinit()
H A Dmemide.c41 uchar *p; in iderw() local
52 p = memdisk + b->blockno*BSIZE; in iderw()
56 memmove(p, b->data, BSIZE); in iderw()
58 memmove(b->data, p, BSIZE); in iderw()
H A Dkalloc.c49 char *p; in freerange() local
50 p = (char*)PGROUNDUP((uint)vstart); in freerange()
51 for(; p + PGSIZE <= (char*)vend; p += PGSIZE) in freerange()
52 kfree(p); in freerange()
H A Dulib.c19 strcmp(const char *p, const char *q) in strcmp() argument
21 while(*p && *p == *q) in strcmp()
22 p++, q++; in strcmp()
23 return (uchar)*p - (uchar)*q; in strcmp()
H A Dstring.c59 strncmp(const char *p, const char *q, uint n) in strncmp() argument
61 while(n > 0 && *p && *p == *q) in strncmp()
62 n--, p++, q++; in strncmp()
65 return (uchar)*p - (uchar)*q; in strncmp()
H A Dx86.h63 lgdt(struct segdesc *p, int size) in lgdt() argument
68 pd[1] = (uint)p; in lgdt()
69 pd[2] = (uint)p >> 16; in lgdt()
77 lidt(struct gatedesc *p, int size) in lidt() argument
82 pd[1] = (uint)p; in lidt()
83 pd[2] = (uint)p >> 16; in lidt()
H A Dsh.c60 int p[2]; in runcmd() local
102 if(pipe(p) < 0) in runcmd()
106 dup(p[1]); in runcmd()
107 close(p[0]); in runcmd()
108 close(p[1]); in runcmd()
113 dup(p[0]); in runcmd()
114 close(p[0]); in runcmd()
115 close(p[1]); in runcmd()
118 close(p[0]); in runcmd()
119 close(p[1]); in runcmd()
H A Dvm.c157 switchuvm(struct proc *p) in switchuvm() argument
159 if(p == 0) in switchuvm()
161 if(p->kstack == 0) in switchuvm()
163 if(p->pgdir == 0) in switchuvm()
171 mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE; in switchuvm()
176 lcr3(V2P(p->pgdir)); // switch to process's address space in switchuvm()
366 copyout(pde_t *pgdir, uint va, void *p, uint len) in copyout() argument
371 buf = (char*)p; in copyout()
H A Dsysfile.c74 char *p; in sys_read() local
76 if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) in sys_read()
78 return fileread(f, p, n); in sys_read()
86 char *p; in sys_write() local
88 if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) in sys_write()
90 return filewrite(f, p, n); in sys_write()
H A Dmmu.h33 uint p : 1; // Present member
156 uint p : 1; // Present member
177 (gate).p = 1; \
H A Dmkfs.c42 void iappend(uint inum, void *p, int n);
258 char *p = (char*)xp; in iappend() local
289 bcopy(p, buf + off - (fbn * BSIZE), n1); in iappend()
293 p += n1; in iappend()
H A Dusertests.c1418 char *a, *b, *c, *lastaddr, *oldbrk, *p, scratch; in sbrktest() local
1455 p = sbrk(amt); in sbrktest()
1456 if (p != a) { in sbrktest()
1550 validateint(int *p) in validateint() argument
1558 "a" (SYS_sleep), "n" (T_SYSCALL), "c" (p) : in validateint()
1566 uint p; in validatetest() local
1571 for(p = 0; p <= (uint)hi; p += 4096){ in validatetest()
1574 validateint((int*)p); in validatetest()
1583 if(link("nosuchfile", (char*)p) != -1){ in validatetest()
H A Dsleep1.p7 spinp sleep1.p
H A Ddot-bochsrc358 # %e : 1 character event type ('i'nfo, 'd'ebug, 'p'anic, 'e'rror)