python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

global.c File Reference

global.c File Reference

VM Globals. More...

Go to the source code of this file.

Functions

PmReturn_t global_init (void)
 Initializes the global struct.
PmReturn_t global_setBuiltins (pPmFunc_t pmod)
 Sets the builtins dict into the given module's attrs.
PmReturn_t global_loadBuiltins (void)
 Loads the "__bt" module and sets the builtins dict (PM_PBUILTINS) to point to __bt's attributes dict.

Variables

volatile PmVmGlobal_t gVmGlobal
 Most PyMite globals all in one convenient place.

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 35 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 208 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:
pmodModule whose attrs receive builtins
Returns:
Return status

Definition at line 182 of file global.c.


Variable Documentation

Most PyMite globals all in one convenient place.

Definition at line 31 of file global.c.