python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

global.h File Reference

global.h File Reference

VM Globals. More...

Go to the source code of this file.

Data Structures

struct  PmVmGlobal_s
 This struct contains ALL of PyMite's globals. More...

Typedefs

typedef struct PmVmGlobal_s PmVmGlobal_t
 This struct contains ALL of PyMite's globals.

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 header.

Definition in file global.h.


Typedef Documentation

typedef struct PmVmGlobal_s PmVmGlobal_t

This struct contains ALL of PyMite's globals.


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.