os/kernel/cpu/tasking.h

24 lines
661 B
C
Raw Normal View History

#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
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();
pid_t tasking_getPID();
2020-07-12 14:28:58 -05:00
int* tasking_get_errno_address();
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();
2019-02-11 09:30:28 -06:00
#endif