python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

thread.h File Reference

thread.h File Reference

VM Thread. More...

Go to the source code of this file.

Data Structures

struct  PmThread_s
 Thread obj. More...

Typedefs

typedef enum PmInterpCtrl_e PmInterpCtrl_t
 Interpreter return values.
typedef struct PmThread_s PmThread_t
 Thread obj.

Enumerations

enum  PmInterpCtrl_e { INTERP_CTRL_ERR = -1, INTERP_CTRL_EXIT = 0, INTERP_CTRL_CONT = 1, INTERP_CTRL_RESCHED = 2 }
 

Interpreter return values.

More...

Functions

PmReturn_t thread_new (pPmObj_t pframe, pPmObj_t *r_pobj)
 Constructs a thread for a root frame.

Detailed Description

VM Thread.

Encapsulating a frame pointer, a root code object and thread state.

Definition in file thread.h.


Typedef Documentation

Interpreter return values.

Used to control interpreter loop and indicate return value. Negative values indicate erroneous results. Positive values indicate "continue interpreting", but first do something special like reschedule threads or (TBD) sweep the heap.

typedef struct PmThread_s PmThread_t

Thread obj.


Enumeration Type Documentation

Interpreter return values.

Used to control interpreter loop and indicate return value. Negative values indicate erroneous results. Positive values indicate "continue interpreting", but first do something special like reschedule threads or (TBD) sweep the heap.

Enumerator:
INTERP_CTRL_ERR 

Generic error causes exit.

INTERP_CTRL_EXIT 

Normal execution exit.

INTERP_CTRL_CONT 

Continue interpreting.

INTERP_CTRL_RESCHED 

Reschedule threads.

Definition at line 38 of file thread.h.


Function Documentation

PmReturn_t thread_new ( pPmObj_t  pframe,
pPmObj_t r_pobj 
)

Constructs a thread for a root frame.

Parameters:
pframeFrame object as a basis for this thread.
r_pobjReturn by reference; Ptr to the newly created thread object.
Returns:
Return status

Definition at line 25 of file thread.c.