Nebula
Loading...
Searching...
No Matches
posixsysfunc.h
Go to the documentation of this file.
1
2#ifndef POSIX_SYSFUNC_H
3#define POSIX_SYSFUNC_H
4//------------------------------------------------------------------------------
13#include "core/types.h"
14#include "core/exithandler.h"
15namespace System
16{
17 class SystemInfo;
18}
19
20//------------------------------------------------------------------------------
21namespace Posix
22{
23
25{
26public:
28 static void Setup();
30 static void Exit(int exitCode);
32 static void Error(const char* error);
34 static void DebugOut(const char* msg);
36 static void MessageBox(const char* msg);
38 static void Sleep(double sec);
39
40private:
41 friend class Core::ExitHandler;
43 static const Core::ExitHandler* RegisterExitHandler(const Core::ExitHandler* exitHandler);
44
45 static bool volatile SetupCalled;
46 static const Core::ExitHandler* ExitHandlers; // forward linked list of exit handlers
48};
49
50};
51//------------------------------------------------------------------------------
52#endif
ExitHandlers are static objects which register themselves automatically once at startup and are calle...
Definition exithandler.h:22
Provides Posix specific helper functions.
Definition posixsysfunc.h:25
static const Core::ExitHandler * RegisterExitHandler(const Core::ExitHandler *exitHandler)
register an exit handler which will be called from within Exit()
Definition posixsysfunc.cc:158
static void Error(const char *error)
display an error message box
Definition posixsysfunc.cc:112
static const Core::ExitHandler * ExitHandlers
Definition posixsysfunc.h:46
static void MessageBox(const char *msg)
display a message box which needs to be confirmed by the user
static void Exit(int exitCode)
exit process, and to proper cleanup, memleak reporting, etc...
Definition posixsysfunc.cc:73
static void Setup()
setup lowlevel static objects (must be called before spawning any threads)
Definition posixsysfunc.cc:41
static bool volatile SetupCalled
Definition posixsysfunc.h:45
static void DebugOut(const char *msg)
print a message on the debug console
Definition posixsysfunc.cc:144
static System::SystemInfo systemInfo
Definition posixsysfunc.h:47
static void Sleep(double sec)
sleep for a specified amount of seconds
Definition posixsysfunc.cc:133
Provides information about the host system.
Posix implemention of a read-many write-few lock.
Definition posixsysfunc.cc:21
Definition osxsysfunc.h:15