MyOS Kernel
tasking.h
Go to the documentation of this file.
1 
5 #ifndef TASKING_H
6 #define TASKING_H
7 
8 #include <stdint.h>
9 #include <sys/types.h>
10 
11 #ifndef KERN_TASKING_H
12 
15 typedef enum thread_state {
21 
22 #endif
23 
27 void yield();
28 
34 void createProcCr3(void* start,void* cr3);
42 void createProcCr3Param(void* start,void* cr3,void* param1,void* param2);
47 void blockThread(thread_state state);
53 void unblockThread(pid_t pid,pid_t tid);
54 
55 
56 #endif
yield
void yield()
Definition: tasking.c:8
createProcCr3Param
void createProcCr3Param(void *start, void *cr3, void *param1, void *param2)
Definition: tasking.c:22
thread_state
thread_state
Definition: tasking.h:15
THREAD_BLOCKED
@ THREAD_BLOCKED
The state of a generically blocked thread.
Definition: tasking.h:19
THREAD_RUNNING
@ THREAD_RUNNING
The state of a running thread.
Definition: tasking.h:16
createProcCr3
void createProcCr3(void *start, void *cr3)
Definition: tasking.c:15
THREAD_EXITED
@ THREAD_EXITED
The state of an exited thread.
Definition: tasking.h:18
blockThread
void blockThread(thread_state state)
Definition: tasking.c:39
unblockThread
void unblockThread(pid_t pid, pid_t tid)
Definition: tasking.c:46
THREAD_READY
@ THREAD_READY
The state of a ready to run thread.
Definition: tasking.h:17