Thread
[Threads]


Detailed Description

API to handle thread objects.


Data Structures

struct  _mutex_t
struct  _data_stack_entry_t
struct  _call_stack_entry_t
struct  _thread_t

Typedefs

typedef struct
_thread_t
thread_t
typedef struct
_call_stack_entry_t
call_stack_entry_t
 A caller.
typedef struct
_call_stack_entry_t
catch_stack_entry_t
 A catcher.

Enumerations

enum  thread_state_t {
  ThreadBlocked, ThreadReady, ThreadRunning, ThreadDying,
  ThreadZombie, ThreadStateMax
}
 Thread states. More...

Functions

thread_t thread_new (word_t prio, program_t p, word_t ip)
 create a new thread structure.
void thread_init (thread_t, word_t prio, program_t p, word_t ip)
 initialize a newly allocated thread structure.
void thread_delete (vm_t, thread_t)
 free a thread's resources and structure.
void thread_deinit (vm_t vm, thread_t t)
 free a thread's resources.
void thread_set_state (vm_t, thread_t, thread_state_t)
 change thread state.


Typedef Documentation

typedef struct _thread_t* thread_t

typedef struct _call_stack_entry_t* call_stack_entry_t

A caller.

typedef struct _call_stack_entry_t* catch_stack_entry_t

A catcher.


Enumeration Type Documentation

enum thread_state_t

Thread states.

Enumerator:
ThreadBlocked 
ThreadReady 
ThreadRunning 
ThreadDying 
ThreadZombie 
ThreadStateMax  Boundary.
Note:
This is not a valid thread state.

This non-state is used during thread pre-initialization.


Function Documentation

thread_t thread_new ( word_t  prio,
program_t  p,
word_t  ip 
)

create a new thread structure.

void thread_init ( thread_t  ,
word_t  prio,
program_t  p,
word_t  ip 
)

initialize a newly allocated thread structure.

void thread_delete ( vm_t  ,
thread_t   
)

free a thread's resources and structure.

void thread_deinit ( vm_t  vm,
thread_t  t 
)

free a thread's resources.

void thread_set_state ( vm_t  ,
thread_t  ,
thread_state_t   
)

change thread state.


Generated on Wed Feb 6 14:46:05 2008 for TinyaML by  doxygen 1.5.3