Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ProcessID Namespace Reference


Detailed Description

holds information to identify currently running process

Although the ProcessID_t enum specifies the maximum number of processes in its NumProcesses value, this doesn't have to correspond to the actual number of active processes. If you want an element of dynamicism to launch and/or close processes at runtime, simply increase the NumProcesses to a higher value so that space can be allocated for those processes in shared memory regions for things like attachment pointers or other per-process data.

Not all processes need to have a *named* id, they just need a unique id.


Enumerations

enum  ProcessID_t { MainProcess, MotionProcess, SoundProcess, NumProcesses }
 Holds ID number for each process. More...

Functions

void setMap (stacktrace::StackFrame idmap[])
 sets location of shared memory map from IDs to current entry point, this is required to be set up before any entry()'s
stacktrace::StackFramegetMapFrame ()
 returns the stack frame which should be set to the entry point of the current function
ProcessID_t getID ()
 returns process's ID number, subject to overriding via setIDHooks()
void setID (ProcessID_t id)
 sets the ID during init (be careful you know what you're doing if you call this), subject to overriding via setIDHooks()
const char * getIDStr ()
 returns a string version of the name of the process

Variables

ProcessID_t ID = NumProcesses
 holds ID number
StackFrameframes = NULL
 array of StackFrame structures, one per NumProcesses, set by setMap()


Enumeration Type Documentation

Holds ID number for each process.

Enumerator:
MainProcess  MainObj process.
MotionProcess  MotoObj process.
SoundProcess  SoundPlay process.
NumProcesses  maximum number of 'friendly' processes -- see class docs

Definition at line 23 of file ProcessID.h.


Function Documentation

void ProcessID::setMap ( stacktrace::StackFrame  idmap[]  ) 

sets location of shared memory map from IDs to current entry point, this is required to be set up before any entry()'s

Parameters:
idmap array of StackFrame structures, one per NumProcesses the idea is to have idmap stored in a shared memory region, so functions can tell which one they belong to

Definition at line 39 of file ProcessID.cc.

stacktrace::StackFrame * ProcessID::getMapFrame (  ) 

returns the stack frame which should be set to the entry point of the current function

this is only valid if it is called before any shared object processing is done

Definition at line 43 of file ProcessID.cc.


Tekkotsu v3.0
Generated Fri May 11 20:09:13 2007 by Doxygen 1.4.7