| 61 | // so MainWin will not interfere with it |
| 62 | |
| 63 | class 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 | |
| 87 | static DeferredCS fconfig_mutex; |
| 88 | #define fcmutex ((CriticalSection &)(*fconfig_mutex.init())) |
nothing calls this directly
no outgoing calls
no test coverage detected