Nebula
Loading...
Searching...
No Matches
Posix::SysFunc Class Reference

#include <posixsysfunc.h>

Detailed Description

Provides Posix specific helper functions.

(C) 2006 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Static Public Member Functions

static void Setup ()
 setup lowlevel static objects (must be called before spawning any threads)
 
static void Exit (int exitCode)
 exit process, and to proper cleanup, memleak reporting, etc...
 
static void Error (const char *error)
 display an error message box
 
static void DebugOut (const char *msg)
 print a message on the debug console
 
static void MessageBox (const char *msg)
 display a message box which needs to be confirmed by the user
 
static void Sleep (double sec)
 sleep for a specified amount of seconds
 

Static Private Member Functions

static const Core::ExitHandlerRegisterExitHandler (const Core::ExitHandler *exitHandler)
 register an exit handler which will be called from within Exit()
 

Static Private Attributes

static bool volatile SetupCalled = false
 
static const Core::ExitHandlerExitHandlers = 0
 
static System::SystemInfo systemInfo
 

Friends

class Core::ExitHandler
 

Member Function Documentation

◆ DebugOut()

void Posix::SysFunc::DebugOut ( const char * msg)
static

print a message on the debug console

Put a message on the debug console.

◆ Error()

void Posix::SysFunc::Error ( const char * error)
static

display an error message box

◆ Exit()

void Posix::SysFunc::Exit ( int exitCode)
static

exit process, and to proper cleanup, memleak reporting, etc...

This method is called by Application::Exit(), or otherwise must be called right before the end of the programs main() function.

The method will properly shutdown the Nebula runtime environment, and report refcounting and memory leaks (debug builds only). This method will not return.

◆ MessageBox()

void Posix::SysFunc::MessageBox ( const char * msg)
static

display a message box which needs to be confirmed by the user

◆ RegisterExitHandler()

const Core::ExitHandler * Posix::SysFunc::RegisterExitHandler ( const Core::ExitHandler * exitHandler)
staticprivate

register an exit handler which will be called from within Exit()

Register a new exit handler.

This method is called at startup time from the constructor of static exit handler objects. This is the only supported way to register exit handlers. The method will return a pointer to the next exit handler in the forward linked list (or 0 if this is the first exit handler).

◆ Setup()

void Posix::SysFunc::Setup ( )
static

setup lowlevel static objects (must be called before spawning any threads)

This method must be called at application start before any threads are spawned.

It is used to setup static objects beforehand (i.e. private heaps of various utility classes). Doing this eliminates the need for fine-grained locking in the affected classes.

◆ Sleep()

void Posix::SysFunc::Sleep ( double sec)
static

sleep for a specified amount of seconds

Sleep for a specified amount of seconds, give up time slice.

Friends And Related Symbol Documentation

◆ Core::ExitHandler

friend class Core::ExitHandler
friend

Member Data Documentation

◆ ExitHandlers

const Core::ExitHandler * Posix::SysFunc::ExitHandlers = 0
staticprivate

◆ SetupCalled

bool volatile Posix::SysFunc::SetupCalled = false
staticprivate

◆ systemInfo

System::SystemInfo Posix::SysFunc::systemInfo
staticprivate

The documentation for this class was generated from the following files: