Files
fastfetch/src/detection/internal.h
T
李通洲 5b2006cd06 Global: get rid of locks
Psychological burden NO MORE
2023-10-31 14:42:45 +08:00

18 lines
349 B
C

#pragma once
#ifndef FF_INCLUDED_detection_internal
#define FF_INCLUDED_detection_internal
#include "common/thread.h"
#define FF_DETECTION_INTERNAL_GUARD(ResultType, ...) \
static ResultType result; \
static bool init = false; \
if(init) \
return &result; \
init = true; \
__VA_ARGS__; \
return &result; \
#endif