The friendly Operating System for the Internet of Things
thread_arch.h File Reference

Architecture dependent kernel interface for handling and managing threads. More...

Detailed Description

#include "kernel_defines.h"
+ Include dependency graph for thread_arch.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void *(* thread_task_func_t) (void *arg)
 Prototype for a thread entry function.
 

Functions

char * thread_arch_stack_init (thread_task_func_t task_func, void *arg, void *stack_start, int stack_size)
 Initialize a thread's stack. More...
 
int thread_arch_isr_stack_usage (void)
 Get the number of bytes used on the ISR stack.
 
void * thread_arch_isr_stack_pointer (void)
 Get the current ISR stack pointer.
 
void * thread_arch_isr_stack_start (void)
 Get the start of the ISR stack.
 
void thread_arch_stack_print (void)
 Print the current stack to stdout.
 
void thread_arch_start_threading (void) NORETURN
 Start threading by loading a threads initial information from the stack.
 
void thread_arch_yield (void)
 Pause the current thread and schedule the next pending, if available.
 

Function Documentation

char* thread_arch_stack_init ( thread_task_func_t  task_func,
void *  arg,
void *  stack_start,
int  stack_size 
)
Parameters
[in]task_funcpointer to the thread's code
[in]argargument to task_func
[in]stack_startpointer to the start address of the thread
[in]stack_sizethe maximum size of the stack
Returns
pointer to the new top of the stack