blob: 235d2c3700fcfd75ad8a2f073c482082521ef6c8 (
plain) (
tree)
|
|
#pragma once
const char* PushWhatThreadDoes(const char* what);
void PopWhatThreadDoes(const char* prev);
const char** WhatThreadDoesLocation();
struct TWhatThreadDoesPushPop {
private:
const char* Prev;
public:
TWhatThreadDoesPushPop(const char* what) {
Prev = PushWhatThreadDoes(what);
}
~TWhatThreadDoesPushPop() {
PopWhatThreadDoes(Prev);
}
};
#ifdef __GNUC__
#define WHAT_THREAD_DOES_FUNCTION __PRETTY_FUNCTION__
#else
#define WHAT_THREAD_DOES_FUNCTION __FUNCTION__
#endif
#define WHAT_THREAD_DOES_PUSH_POP_CURRENT_FUNC() \
TWhatThreadDoesPushPop whatThreadDoesPushPopCurrentFunc(WHAT_THREAD_DOES_FUNCTION)
|