global.c File Reference

VM Globals. More...

#include "pm.h"

Go to the source code of this file.

Defines

#define __FILE_ID__   0x05

Functions

PmReturn_t global_init (void)
PmReturn_t global_setBuiltins (pPmFunc_t pmod)
PmReturn_t global_loadBuiltins (void)

Variables

unsigned char const * stdlib_img
static uint8_t const * bistr = (uint8_t const *)"__bi"
volatile PmVmGlobal_t gVmGlobal


Detailed Description

VM Globals.

VM globals operations. PyMite's global struct def and initial values.

Definition in file global.c.


Function Documentation

PmReturn_t global_init ( void   ) 

Initializes the global struct

Returns:
Return status

Definition at line 42 of file global.c.

PmReturn_t global_loadBuiltins ( void   ) 

Loads the "__bt" module and sets the builtins dict (PM_PBUILTINS) to point to __bt's attributes dict. Creates "None" = None entry in builtins.

When run, there should not be any other threads in the interpreter thread list yet.

Returns:
Return status

Definition at line 209 of file global.c.

PmReturn_t global_setBuiltins ( pPmFunc_t  pmod  ) 

Sets the builtins dict into the given module's attrs.

If not yet done, loads the "__bt" module via global_loadBuiltins(). Restrictions described in that functions documentation apply.

Parameters:
pmod Module whose attrs receive builtins
Returns:
Return status

Definition at line 183 of file global.c.


Variable Documentation

Most PyMite globals all in one convenient place

Definition at line 38 of file global.c.


Generated on Mon Oct 18 07:40:49 2010 for Python-on-a-chip by  doxygen 1.5.9