Go to the source code of this file.
|
enum | process_states {
DEAD = 0,
READY,
RUNNING,
SLEEPING,
BLOCKED_ON_MUTEX,
WAITING_ON_EVENT,
TERMINATED
} |
|
enum | kernel_request_type {
NONE = 0,
CREATE,
NEXT,
SLEEP,
TERMINATE,
SUSPEND,
RESUME,
MUTEX_INIT,
MUTEX_LOCK,
MUTEX_UNLOCK,
EVENT_INIT,
EVENT_WAIT,
EVENT_SIGNAL
} |
|
enum | mutex_state { DISABLED,
FREE,
LOCKED
} |
|
enum | event_state { INACTIVE,
UNSIGNALLED,
SIGNALLED
} |
|
#define Disable_Interrupt |
( |
| ) |
asm volatile ("cli"::) |
Definition at line 16 of file os.h.
#define Enable_Interrupt |
( |
| ) |
asm volatile ("sei"::) |
Definition at line 17 of file os.h.
Definition at line 7 of file os.h.
Definition at line 6 of file os.h.
Definition at line 4 of file os.h.
#define MINPRIORITY 10 /** 0 is the highest priority, 10 the lowest */ |
Definition at line 9 of file os.h.
#define MSECPERTICK 10 /** resolution of a system tick in milliseconds */ |
Definition at line 8 of file os.h.
#define NULL 0 /** undefined */ |
Definition at line 13 of file os.h.
#define WORKSPACE 256 /** in bytes, per THREAD */ |
Definition at line 5 of file os.h.
typedef unsigned int EVENT |
Definition at line 24 of file os.h.
This is the set of states that a mutex can be in at any given time.
Each event is represented by a event struct, which contains all relevant information about this event.
This is the set of kernel requests
Each mutex is represented by a mutex struct, which contains all relevant information about this mutex.
typedef unsigned int MUTEX |
always non-zero if it is valid
Definition at line 22 of file os.h.
This is the set of states that a mutex can be in at any given time.
Each task is represented by a process descriptor, which contains all relevant information about this task. For convenience, we also store the task's stack, i.e., its workspace, in here.
pointer to void f(void)
Definition at line 21 of file os.h.
always non-zero if it is valid
Definition at line 23 of file os.h.
This is the set of states that a task can be in at any given time.
typedef unsigned int TICK |
always non-zero if it is valid
Definition at line 25 of file os.h.
typedef void(* voidfuncptr) (void) |
Definition at line 19 of file os.h.
This is the set of states that a mutex can be in at any given time.
Enumerator |
---|
INACTIVE |
|
UNSIGNALLED |
|
SIGNALLED |
|
Definition at line 82 of file os.h.
This is the set of kernel requests
Enumerator |
---|
NONE |
|
CREATE |
|
NEXT |
|
SLEEP |
|
TERMINATE |
|
SUSPEND |
|
RESUME |
|
MUTEX_INIT |
|
MUTEX_LOCK |
|
MUTEX_UNLOCK |
|
EVENT_INIT |
|
EVENT_WAIT |
|
EVENT_SIGNAL |
|
Definition at line 43 of file os.h.
This is the set of states that a mutex can be in at any given time.
Enumerator |
---|
DISABLED |
|
FREE |
|
LOCKED |
|
Definition at line 62 of file os.h.
This is the set of states that a task can be in at any given time.
Enumerator |
---|
DEAD |
|
READY |
|
RUNNING |
|
SLEEPING |
|
BLOCKED_ON_MUTEX |
|
WAITING_ON_EVENT |
|
TERMINATED |
|
Definition at line 30 of file os.h.
EVENT Event_Init |
( |
void |
| ) |
|
Application level event init to setup system call
Definition at line 711 of file os.c.
void Event_Signal |
( |
EVENT |
e | ) |
|
Application level event signal to setup system call
Definition at line 735 of file os.c.
void Event_Wait |
( |
EVENT |
e | ) |
|
Application level event wait to setup system call
Definition at line 723 of file os.c.
MUTEX Mutex_Init |
( |
void |
| ) |
|
Application level mutex init to setup system call
Definition at line 674 of file os.c.
void Mutex_Lock |
( |
MUTEX |
m | ) |
|
Application level mutex lock to setup system call
Definition at line 686 of file os.c.
void Mutex_Unlock |
( |
MUTEX |
m | ) |
|
Application level mutex unlock to setup system call
Definition at line 699 of file os.c.
Just quits
Definition at line 667 of file os.c.
Application or kernel level task create to setup system call
Definition at line 747 of file os.c.
Application level task getarg to return intiial arg value
Definition at line 829 of file os.c.
Application level task next to setup system call to give up CPU
Definition at line 768 of file os.c.
void Task_Resume |
( |
PID |
p | ) |
|
Application level task resume to setup system call
Definition at line 805 of file os.c.
void Task_Sleep |
( |
TICK |
t | ) |
|
Application level task sleep to setup system call
Definition at line 779 of file os.c.
void Task_Suspend |
( |
PID |
p | ) |
|
Application level task suspend to setup system call
Definition at line 793 of file os.c.
void Task_Terminate |
( |
void |
| ) |
|
Prototypes
Application level task terminate to setup system call
Definition at line 817 of file os.c.