Squash commits for public release

This commit is contained in:
2025-02-12 09:54:05 -05:00
commit 7118adc514
1108 changed files with 80873 additions and 0 deletions

39
test/bench/main.cpp Normal file
View File

@@ -0,0 +1,39 @@
#include "common.h"
#include <cstdio>
#include <cstdlib>
#include <sys/wait.h>
#include <unistd.h>
char* bench_name;
int bench_pno = -1;
int bench_no = 0;
int bench_run = 0;
timeval_t tv, ttv;
timezone_t tz;
void bench_kernel()
{
RUN_BENCH("FORK", 3)
{
for (int i = 0; i < 20; i++) {
int pid = fork();
if (pid < 0) {
return;
}
if (pid) {
wait(pid);
} else {
exit(0);
}
}
}
}
int main(int argc, char** argv)
{
bench_kernel();
bench_pngloader();
printf("[BENCH END]\n\n");
fflush(stdout);
return 0;
}