MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / DeferredCS

Class DeferredCS

server/fakerconfig.cpp:63–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61// so MainWin will not interfere with it
62
63class DeferredCS : CriticalSection
64{
65 public:
66 DeferredCS() : isInit(false) {}
67
68 DeferredCS *init(void)
69 {
70 if(!isInit)
71 {
72 isInit = true;
73 pthread_mutexattr_t ma;
74 pthread_mutexattr_init(&ma);
75 pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
76 pthread_mutex_init(&mutex, &ma);
77 pthread_mutexattr_destroy(&ma);
78 }
79 return this;
80 }
81
82 private:
83
84 bool isInit;
85};
86
87static DeferredCS fconfig_mutex;
88#define fcmutex ((CriticalSection &)(*fconfig_mutex.init()))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected