This repository has been archived on 2021-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
OS/pintos-env/pintos/tests/vm/page-parallel.c

22 lines
429 B
C
Raw Normal View History

/* Runs 4 child-linear processes at once. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
#define CHILD_CNT 4
void
test_main (void)
{
pid_t children[CHILD_CNT];
int i;
for (i = 0; i < CHILD_CNT; i++)
CHECK ((children[i] = exec ("child-linear")) != -1,
"exec \"child-linear\"");
for (i = 0; i < CHILD_CNT; i++)
CHECK (wait (children[i]) == 0x42, "wait for child %d", i);
}