xoreos  0.0.5
Namespaces | Functions | Variables
threads.cpp File Reference

Threading system helpers. More...

#include <cassert>
#include "src/common/fallthrough.h"
#include <SDL_thread.h>
#include "src/common/types.h"
#include "src/common/error.h"
#include "src/common/threads.h"
Include dependency graph for threads.cpp:

Go to the source code of this file.

Namespaces

 Common
 

Functions

void Common::initThreads ()
 Initialize the global threading system. More...
 
bool Common::initedThreads ()
 Was the global threading system initialized? More...
 
bool Common::isMainThread ()
 Returns true if called from the main thread, false otherwise. More...
 
void Common::enforceMainThread ()
 Throws an Exception if called from a non-main thread. More...
 

Variables

START_IGNORE_IMPLICIT_FALLTHROUGH static STOP_IGNORE_IMPLICIT_FALLTHROUGH bool threadsInited = false
 
static SDL_threadID threadsMainID
 

Detailed Description

Threading system helpers.

See also class Thread in thread.h.

Definition in file threads.cpp.

Variable Documentation

◆ threadsInited

START_IGNORE_IMPLICIT_FALLTHROUGH static STOP_IGNORE_IMPLICIT_FALLTHROUGH bool threadsInited = false
static

Definition at line 38 of file threads.cpp.

Referenced by Common::initedThreads(), Common::initThreads(), and Common::isMainThread().

◆ threadsMainID

SDL_threadID threadsMainID
static

Definition at line 39 of file threads.cpp.

Referenced by Common::initThreads(), and Common::isMainThread().