Compare commits
No commits in common. "7a097f16eaa9aa6bbd10fc3759169bfe7ede8c8a" and "6088031c49ed0d273e46fef6aa72d44aaca67ba7" have entirely different histories.
7a097f16ea
...
6088031c49
@ -1,4 +1,4 @@
|
||||
APPS := init fib leap art memeater quota
|
||||
APPS := init fib leap art memeater
|
||||
|
||||
APPS_DIR := $(LUNA_ROOT)/apps
|
||||
APPS_SRC := $(APPS_DIR)/src
|
||||
|
@ -1,22 +0,0 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
if (open("/file/that/does/not/exist", O_RDONLY) < 0) { perror("open"); }
|
||||
int sys = open("/sys", O_RDONLY);
|
||||
if (sys < 0) { perror("open"); }
|
||||
if (read(sys, NULL, 20) < 0) { perror("read"); }
|
||||
char buf[20];
|
||||
if (read(sys, buf, 20) < 0) { perror("read"); }
|
||||
if (close(sys) < 0) { perror("close"); }
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (open("/", O_RDONLY) < 0) { perror("open"); }
|
||||
}
|
||||
int exec;
|
||||
if ((exec = open("/bin/quota", O_RDONLY)) < 0) { perror("open"); }
|
||||
if (read(exec, buf, 20) < 0) { perror("read"); }
|
||||
if (close(exec) < 0) { perror("close"); }
|
||||
}
|
@ -33,6 +33,8 @@
|
||||
#include "thread/PIT.h"
|
||||
#include "thread/Scheduler.h"
|
||||
|
||||
extern "C" void _userspace();
|
||||
|
||||
extern "C" void _start()
|
||||
{
|
||||
Init::check_magic();
|
||||
@ -123,7 +125,7 @@ extern "C" void _start()
|
||||
}
|
||||
});
|
||||
|
||||
uint64_t demo = Mersenne::get() % 6;
|
||||
uint64_t demo = Mersenne::get() % 5;
|
||||
|
||||
switch (demo)
|
||||
{
|
||||
@ -147,10 +149,6 @@ extern "C" void _start()
|
||||
kinfoln("Loading demo: memory eating program");
|
||||
Scheduler::load_user_task("bin/memeater");
|
||||
break;
|
||||
case 5:
|
||||
kinfoln("Loading demo: misbehaving program");
|
||||
Scheduler::load_user_task("bin/quota");
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user