blob: a41eaf772278d333f60f3f38d9b0e4f61a4c35e1 (
plain) (
tree)
|
|
#ifndef DEF_TASK_NS_H
#define DEF_TASK_NS_H
#include <TaskManager/Thread.class.h>
#include <VTManager/VirtualTerminal.proto.h>
namespace Task {
extern Thread* currentThread;
extern Process* currentProcess;
void initialize(String cmdline, VirtualTerminal *vt); //cmdline should be the bootloader kernel command line, if anybody needs it
void doSwitch();
void triggerSwitch();
u32int nextPid();
bool IRQwakeup(u8int irq);
void allocKernelPageTable(u32int id, page_table_t *table, u32int tablePhys);
Process* getKernelProcess(); //Returns first registered process
void currentThreadExits(u32int errcode); //Syscall called when a thread finishes
//These are used by the constructors/destructors of Thread and Process
void registerThread(Thread* t);
void unregisterThread(Thread* t);
void registerProcess(Process* p);
void unregisterProcess(Process* p);
}
#endif
|