EE445M RTOS
Taken at the University of Texas Spring 2015
os.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_ints.h"
#include "libstd/nexus.h"
#include "libschedule/edf.h"
#include "thread_structures.h"
Include dependency graph for os.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hwcontext
 
struct  swcontext
 

Macros

#define OS_STACK_SIZE   100
 
#define OS_NUM_POOLS   2
 
#define OS_SYSTEM_POOL   0
 
#define OS_REAL_TIME_POOL   0
 
#define OS_INTERACTIVE_POOL   1
 
#define os_spawn_thread(_thread, _priority)   os_add_thread(_thread, priority)
 
#define os_kill_thread(_thread)   os_remove_thread(_thread)
 
#define os_surrender_context()   os_suspend()
 

Typedefs

typedef struct hwcontext hwcontext_t
 
typedef struct swcontext swcontext_t
 

Functions

void os_threading_init (void)
 
void _os_reset_thread_stack (tcb_t *tcb, task_t task)
 
int8_t get_os_num_threads ()
 
tcb_tos_add_thread (task_t)
 
tcb_tos_remove_thread (task_t)
 
tcb_tos_tcb_of (task_t)
 
tcb_t_os_next_dead_thread ()
 
int32_t os_running_thread_id ()
 
void os_launch ()
 
void os_suspend ()
 

Variables

static tcb_tos_running_threads = NULL
 
static tcb_tos_dead_threads = NULL
 
static tcb_tOS_NEXT_THREAD
 
static tcb_t OS_THREADS [SCHEDULER_MAX_THREADS]
 
static tcb_tOS_THREAD_POOL [2]