2019-02-11 09:47:28 -06:00
|
|
|
#ifndef CPU_TASKING_H
|
|
|
|
#define CPU_TASKING_H
|
2019-02-25 15:42:23 -06:00
|
|
|
|
2019-02-11 09:30:28 -06:00
|
|
|
#include "i386/tasking.h"
|
2019-05-11 10:11:28 -05:00
|
|
|
#include "i386/isr.h"
|
2020-07-12 14:28:58 -05:00
|
|
|
#include <sys/types.h>
|
2020-07-20 09:51:30 -05:00
|
|
|
#include "../rpc.h"
|
2019-02-11 09:30:28 -06:00
|
|
|
|
2020-07-21 16:29:57 -05:00
|
|
|
extern Thread* currentThread;
|
|
|
|
|
2020-07-20 09:51:30 -05:00
|
|
|
void tasking_createTask(void* eip,void* cr3,char kmode,char param1_exists,uint32_t param1_arg,char param2_exists,uint32_t param2_arg,char isThread);
|
2019-02-11 09:30:28 -06:00
|
|
|
void tasking_init();
|
2020-07-20 09:51:30 -05:00
|
|
|
char tasking_isPrivleged();
|
2020-07-20 11:24:09 -05:00
|
|
|
pid_t tasking_getPID();
|
2020-07-12 14:28:58 -05:00
|
|
|
int* tasking_get_errno_address();
|
2020-07-20 11:24:09 -05:00
|
|
|
void tasking_new_thread(void* start,pid_t pid,char param_exists,uint32_t param_arg);
|
2020-07-12 14:28:58 -05:00
|
|
|
|
2020-07-20 09:51:30 -05:00
|
|
|
void tasking_exit(uint8_t code);
|
|
|
|
void tasking_block(ThreadState newstate);
|
|
|
|
void tasking_unblock(pid_t pid,uint32_t tid);
|
|
|
|
void tasking_yield();
|
2020-07-21 16:29:57 -05:00
|
|
|
|
2019-02-11 09:30:28 -06:00
|
|
|
#endif
|