thread.h File Reference

VM Thread. More...

#include "interp.h"

Go to the source code of this file.

Classes

struct  PmThread_s

Defines

#define THREAD_RESCHEDULE_FREQUENCY   10

Typedefs

typedef enum PmInterpCtrl_e PmInterpCtrl_t
typedef enum PmInterpCtrl_epPmInterpCtrl_t
typedef struct PmThread_s PmThread_t
typedef struct PmThread_spPmThread_t

Enumerations

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

Functions

PmReturn_t thread_new (pPmObj_t pframe, pPmObj_t *r_pobj)


Detailed Description

VM Thread.

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


Define Documentation

#define THREAD_RESCHEDULE_FREQUENCY   10

Frequency in Hz to switch threads


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


Function Documentation

PmReturn_t thread_new ( pPmObj_t  pframe,
pPmObj_t r_pobj 
)

Constructs a thread for a root frame.

Parameters:
pframe Frame object as a basis for this thread.
r_obj Addr to th newly created thread object.
Returns:
Return status


Generated on Wed Feb 24 13:37:03 2010 for Python-on-a-chip by  doxygen 1.5.9