2021-09-14 15:57:06 +00:00
|
|
|
/*
|
|
|
|
* tasking.h
|
|
|
|
*
|
|
|
|
* Created on: Sep 8, 2011
|
|
|
|
* Author: Tiberiu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TASKING_H_
|
|
|
|
#define TASKING_H_
|
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
#include <memory-add.h>
|
|
|
|
|
|
|
|
typedef struct _Task {
|
|
|
|
uint32 Pid;
|
2021-09-14 15:58:06 +00:00
|
|
|
uint32 Eip, Esp, Ebp;
|
2021-09-14 15:57:06 +00:00
|
|
|
PageDirectory* Pd;
|
|
|
|
uint32 StackLowerBase;
|
|
|
|
uint32 StackUpperBase;
|
2021-09-14 15:58:06 +00:00
|
|
|
uint8 Initialized;
|
2021-09-14 15:57:06 +00:00
|
|
|
struct _Task* Next;
|
|
|
|
} Task;
|
|
|
|
|
|
|
|
extern void TaskInitialize();
|
|
|
|
extern void TaskSwitch ();
|
|
|
|
extern void TaskCreate (void (*func)());
|
|
|
|
|
|
|
|
#endif /* TASKING_H_ */
|