-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathos2021_thread_api.h
More file actions
35 lines (26 loc) · 839 Bytes
/
os2021_thread_api.h
File metadata and controls
35 lines (26 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef OS2021_API_H
#define OS2021_API_H
#define STACK_SIZE 8192
#include "link_list.h"
#include "function_libary.h"
void CreateContext(ucontext_t *, ucontext_t *, void *);
void InitAllQueues();
int CheckBitMap(list_t *queue);
int CheckQueueHaveNode(list_t *queue, int priority);
int AssignTQ(TCB **node);
void RunTask();
void ListAllNode(list_t *queue);
int OS2021_ThreadCreate(char *job_name, char *p_function, char *priority, int cancel_mode);
void OS2021_ThreadCancel(char *job_name);
void OS2021_ThreadWaitEvent(int event_id);
void OS2021_ThreadSetEvent(int event_id);
void OS2021_ThreadWaitTime(int msec);
void OS2021_DeallocateThreadResource();
void OS2021_TestCancel();
void TimerCalc();
void Dispatcher();
void ResetTimer(int a);
void AlarmHandler(int a);
void SigtStpHandler();
void StartSchedulingSimulation();
#endif