metal-cos/tests/spawnanytest.c
2023-10-02 18:16:18 -04:00

29 lines
490 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// Castor Only
#include <syscall.h>
int
main(int argc, const char *argv[])
{
int status[10];
printf("Spawn parallel test wait any: ");
for (int i = 0; i < 10; i++) {
status[i] = OSSpawn("/bin/echo", &argv[0]);
printf("spawn: %lx\n", status[i]);
}
for (int i = 0; i < 10; i++) {
status[i] = OSWait(0);
printf("wait: %lx\n", status[i]);
}
printf("Success!\n");
return 0;
}