luxos/Kernel/include/tasking.h
2021-09-14 19:02:20 +03:00

34 lines
658 B
C

/*
* tasking.h
*
* Created on: Sep 7, 2011
* Author: Tiberiu
*/
#ifndef TASKING_H_
#define TASKING_H_
#include <memory-add.h>
typedef struct _Task{
uint32 Pid; // Process ID
uint32 Esp, Ebp, Eip; // Stack, base and instruction pointers
PageDirectory* Pd; // Page dir
struct _Task *Next; // Next task in a linked list
} Task;
extern void TaskingInitialize();
extern void TaskingScheduler();
extern void TaskingSwitch();
extern int32 Fork();
extern void TaskingSetInitialStack(uint32 addr);
extern void TaskingMoveStack (uint32 newstart, uint32 size);
extern int32 GetPid();
extern uint32 TaskingReadEip();
#endif /* TASKING_H_ */