Files
bsb2/kernel/user/app1/appl.cc
Eggert Jung a50503e8c9 add kill + example code
scheduler.kill seems like its not implemented comletly or doest work as
expected.
2025-12-03 07:07:34 +01:00

21 lines
368 B
C++

// vim: set noet ts=4 sw=4:
#include "appl.h"
#include "../../syscall/stub.h"
void Application::action() { // NOLINT
// Thread 1 may be an auxiliary thread
//sys_test(1,2,3,4,5);
unsigned id = sys_getpid();
char text[] = "testX";
text[4] = 0x30+id;
for (unsigned i = 1;; ++i) {
write(0, text, sizeof(text));
if(i==id)
sys_exit();
sleep(1000);
}
}