pid                95 kernel/proc.c    int pid;
pid                98 kernel/proc.c    pid = nextpid;
pid               102 kernel/proc.c    return pid;
pid               125 kernel/proc.c    p->pid = allocpid();
pid               165 kernel/proc.c    p->pid = 0;
pid               261 kernel/proc.c    int i, pid;
pid               292 kernel/proc.c    pid = np->pid;
pid               304 kernel/proc.c    return pid;
pid               373 kernel/proc.c    int havekids, pid;
pid               389 kernel/proc.c            pid = pp->pid;
pid               401 kernel/proc.c            return pid;
pid               601 kernel/proc.c  kkill(int pid)
pid               605 kernel/proc.c    if (pid == 0)
pid               610 kernel/proc.c      if (p->pid == pid) {
pid               700 kernel/proc.c      printk("%d %s %s", p->pid, state, p->name);
pid                90 kernel/proc.h    int pid;              // Process ID
pid                18 kernel/sleeplock.c   lk->pid = 0;
pid                32 kernel/sleeplock.c   lk->pid = myproc()->pid;
pid                41 kernel/sleeplock.c   lk->pid = 0;
pid                52 kernel/sleeplock.c   r = lk->locked && (lk->pid == myproc()->pid);
pid                 8 kernel/sleeplock.h   int pid;    // Process holding lock
pid               148 kernel/syscall.c     printk("%d %s: unknown sys call %d\n", p->pid, p->name, num);
pid                22 kernel/sysproc.c   return myproc()->pid;
pid                95 kernel/sysproc.c   int pid;
pid                97 kernel/sysproc.c   argint(0, &pid);
pid                98 kernel/sysproc.c   return kkill(pid);
pid                76 kernel/trap.c      printk("usertrap(): unexpected scause 0x%lx pid=%d\n", r_scause(), p->pid);
pid                19 user/forktest.c   int n, pid;
pid                24 user/forktest.c     pid = fork();
pid                25 user/forktest.c     if (pid < 0)
pid                27 user/forktest.c     if (pid == 0)
pid               108 user/grind.c         int pid = fork();
pid               109 user/grind.c         if (pid == 0) {
pid               111 user/grind.c         } else if (pid < 0) {
pid               117 user/grind.c         int pid = fork();
pid               118 user/grind.c         if (pid == 0) {
pid               122 user/grind.c         } else if (pid < 0) {
pid               133 user/grind.c         int pid = fork();
pid               134 user/grind.c         if (pid == 0) {
pid               137 user/grind.c         } else if (pid < 0) {
pid               145 user/grind.c         kill(pid);
pid               148 user/grind.c         int pid = fork();
pid               149 user/grind.c         if (pid == 0) {
pid               152 user/grind.c         } else if (pid < 0) {
pid               163 user/grind.c         int pid = fork();
pid               164 user/grind.c         if (pid == 0) {
pid               173 user/grind.c         } else if (pid < 0) {
pid               181 user/grind.c         int pid = fork();
pid               182 user/grind.c         if (pid == 0) {
pid               190 user/grind.c         } else if (pid < 0) {
pid               340 user/grind.c       int pid = fork();
pid               341 user/grind.c       if (pid == 0) {
pid               345 user/grind.c       if (pid > 0) {
pid                17 user/init.c      int pid, wpid;
pid                28 user/init.c        pid = fork();
pid                29 user/init.c        if (pid < 0) {
pid                33 user/init.c        if (pid == 0) {
pid                43 user/init.c          if (wpid == pid) {
pid               190 user/sh.c        int pid;
pid               192 user/sh.c        pid = fork();
pid               193 user/sh.c        if (pid == -1)
pid               195 user/sh.c        return pid;
pid               175 user/usertests.c   int pid = fork();
pid               176 user/usertests.c   if (pid < 0) {
pid               180 user/usertests.c   if (pid == 0) {
pid               377 user/usertests.c   int pid, xstatus;
pid               381 user/usertests.c   pid = fork();
pid               382 user/usertests.c   if (pid < 0) {
pid               387 user/usertests.c   if (pid == 0) {
pid               453 user/usertests.c   int pid, xstatus;
pid               455 user/usertests.c   pid = fork();
pid               456 user/usertests.c   if (pid < 0) {
pid               460 user/usertests.c   if (pid == 0) {
pid               493 user/usertests.c   int pid, xstatus;
pid               499 user/usertests.c   pid = fork();
pid               500 user/usertests.c   if (pid < 0) {
pid               504 user/usertests.c   if (pid == 0) {
pid               685 user/usertests.c   int fd, xstatus, pid;
pid               690 user/usertests.c   pid = fork();
pid               691 user/usertests.c   if (pid < 0) {
pid               695 user/usertests.c   if (pid == 0) {
pid               717 user/usertests.c   if (wait(&xstatus) != pid) {
pid               748 user/usertests.c   int fds[2], pid, xstatus;
pid               756 user/usertests.c   pid = fork();
pid               758 user/usertests.c   if (pid == 0) {
pid               769 user/usertests.c   } else if (pid > 0) {
pid               831 user/usertests.c   int pid, xst;
pid               835 user/usertests.c   pid = fork();
pid               836 user/usertests.c   if (pid < 0) {
pid               840 user/usertests.c   if (pid == 0) {
pid               843 user/usertests.c   if (wait(&xst) != pid) {
pid               914 user/usertests.c   int i, pid;
pid               917 user/usertests.c     pid = fork();
pid               918 user/usertests.c     if (pid < 0) {
pid               922 user/usertests.c     if (pid) {
pid               924 user/usertests.c       if (wait(&xstate) != pid) {
pid               946 user/usertests.c     int pid = fork();
pid               947 user/usertests.c     if (pid < 0) {
pid               951 user/usertests.c     if (pid) {
pid               952 user/usertests.c       if (wait(0) != pid) {
pid              1003 user/usertests.c     int pid = fork();
pid              1004 user/usertests.c     if (pid < 0) {
pid              1008 user/usertests.c     if (pid == 0) {
pid              1038 user/usertests.c   int pid = fork();
pid              1039 user/usertests.c   if (pid < 0) {
pid              1043 user/usertests.c   if (pid == 0) {
pid              1093 user/usertests.c   int pid;
pid              1095 user/usertests.c   if ((pid = fork()) == 0) {
pid              1132 user/usertests.c   int fd, pid, i, n, nc, np;
pid              1142 user/usertests.c   pid = fork();
pid              1143 user/usertests.c   memset(buf, pid == 0 ? 'c' : 'p', sizeof(buf));
pid              1150 user/usertests.c   if (pid == 0) {
pid              1189 user/usertests.c   int fd, pid, i, j, n, total, pi;
pid              1198 user/usertests.c     pid = fork();
pid              1199 user/usertests.c     if (pid < 0) {
pid              1204 user/usertests.c     if (pid == 0) {
pid              1256 user/usertests.c   int pid, i, fd, pi;
pid              1260 user/usertests.c     pid = fork();
pid              1261 user/usertests.c     if (pid < 0) {
pid              1266 user/usertests.c     if (pid == 0) {
pid              1433 user/usertests.c   int i, pid, n, fd;
pid              1445 user/usertests.c     pid = fork();
pid              1446 user/usertests.c     if (pid && (i % 3) == 1) {
pid              1448 user/usertests.c     } else if (pid == 0 && (i % 5) == 1) {
pid              1458 user/usertests.c     if (pid == 0) {
pid              1497 user/usertests.c     pid = fork();
pid              1498 user/usertests.c     if (pid < 0) {
pid              1502 user/usertests.c     if (((i % 3) == 0 && pid == 0) || ((i % 3) == 1 && pid != 0)) {
pid              1517 user/usertests.c     if (pid == 0)
pid              1529 user/usertests.c   int pid, i;
pid              1532 user/usertests.c   pid = fork();
pid              1533 user/usertests.c   if (pid < 0) {
pid              1538 user/usertests.c   unsigned int x = (pid ? 1 : 97);
pid              1550 user/usertests.c   if (pid)
pid              1997 user/usertests.c   int n, pid;
pid              2000 user/usertests.c     pid = fork();
pid              2001 user/usertests.c     if (pid < 0)
pid              2003 user/usertests.c     if (pid == 0)
pid              2034 user/usertests.c   int i, pid, xstatus;
pid              2038 user/usertests.c   pid = fork();
pid              2039 user/usertests.c   if (pid < 0) {
pid              2043 user/usertests.c   if (pid == 0) {
pid              2077 user/usertests.c   pid = fork();
pid              2078 user/usertests.c   if (pid < 0) {
pid              2088 user/usertests.c   if (pid == 0)
pid              2156 user/usertests.c   int pid;
pid              2159 user/usertests.c     pid = fork();
pid              2160 user/usertests.c     if (pid < 0) {
pid              2164 user/usertests.c     if (pid == 0) {
pid              2181 user/usertests.c     int pid;
pid              2182 user/usertests.c     pid = fork();
pid              2183 user/usertests.c     if (pid < 0) {
pid              2187 user/usertests.c     if (pid == 0) {
pid              2210 user/usertests.c   int pid;
pid              2254 user/usertests.c   pid = fork();
pid              2255 user/usertests.c   if (pid < 0) {
pid              2259 user/usertests.c   if (pid == 0) {
pid              2338 user/usertests.c   int pid, fd, xstatus;
pid              2341 user/usertests.c   pid = fork();
pid              2342 user/usertests.c   if (pid == 0) {
pid              2357 user/usertests.c   } else if (pid < 0) {
pid              2444 user/usertests.c   int pid;
pid              2447 user/usertests.c   pid = fork();
pid              2448 user/usertests.c   if (pid == 0) {
pid              2454 user/usertests.c   } else if (pid < 0) {
pid              2470 user/usertests.c   int pid;
pid              2480 user/usertests.c     pid = fork();
pid              2481 user/usertests.c     if (pid == 0) {
pid              2486 user/usertests.c     } else if (pid < 0) {
pid              2520 user/usertests.c   int pid = fork();
pid              2521 user/usertests.c   if (pid < 0) {
pid              2525 user/usertests.c   if (pid == 0) {
pid              2536 user/usertests.c   pid = fork();
pid              2537 user/usertests.c   if (pid < 0) {
pid              2541 user/usertests.c   if (pid == 0) {
pid              2551 user/usertests.c   pid = fork();
pid              2552 user/usertests.c   if (pid < 0) {
pid              2556 user/usertests.c   if (pid == 0) {
pid              2658 user/usertests.c   int pid;
pid              2672 user/usertests.c     pid = fork();
pid              2673 user/usertests.c     if (pid < 0) {
pid              2676 user/usertests.c     } else if (pid == 0) {
pid              3093 user/usertests.c     int pid = fork();
pid              3094 user/usertests.c     if (pid < 0) {
pid              3099 user/usertests.c     if (pid == 0) {
pid              3182 user/usertests.c     int pid = fork();
pid              3183 user/usertests.c     if (pid < 0) {
pid              3186 user/usertests.c     } else if (pid == 0) {
pid              3415 user/usertests.c   int pid;
pid              3419 user/usertests.c   if ((pid = fork()) < 0) {
pid              3423 user/usertests.c   if (pid == 0) {