-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel_threads.c
More file actions
77 lines (61 loc) · 965 Bytes
/
kernel_threads.c
File metadata and controls
77 lines (61 loc) · 965 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "tinyos.h"
#include "kernel_sched.h"
#include "kernel_proc.h"
/**
@brief Create a new thread in the current process.
*/
Tid_t CreateThread(Task task, int argl, void* args)
{
return NOTHREAD;
}
/**
@brief Return the Tid of the current thread.
*/
Tid_t ThreadSelf()
{
return (Tid_t) CURTHREAD;
}
/**
@brief Join the given thread.
*/
int ThreadJoin(Tid_t tid, int* exitval)
{
return -1;
}
/**
@brief Detach the given thread.
*/
int ThreadDetach(Tid_t tid)
{
return -1;
}
/**
@brief Terminate the current thread.
*/
void ThreadExit(int exitval)
{
}
/**
@brief Awaken the thread, if it is sleeping.
This call will set the interrupt flag of the
thread.
*/
int ThreadInterrupt(Tid_t tid)
{
return -1;
}
/**
@brief Return the interrupt flag of the
current thread.
*/
int ThreadIsInterrupted()
{
return 0;
}
/**
@brief Clear the interrupt flag of the
current thread.
*/
void ThreadClearInterrupt()
{
}