-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInitializer.h
More file actions
38 lines (33 loc) · 933 Bytes
/
Initializer.h
File metadata and controls
38 lines (33 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Copyright(c) 2000 arton
*
* You may distribute under the terms of either the GNU General Public
* License
*
* $Date: 2006-11-03 04:23:11 +0900 (Fri, 03 11 2006) $
*/
#ifndef INITALIZER_HEADER
#define INITALIZER_HEADER
extern "C" void NtInitialize(int *, char ***);
class CInitializer
{
public:
CInitializer();
~CInitializer();
void InitNew();
static inline CInitializer& GetInstance() { return GlobalInitializer; }
inline void Lock() { m_crit.Lock(); }
inline void Unlock() { m_crit.Unlock(); }
inline bool IsInit() const { return m_fInit; }
inline void SetInit(bool f) { m_fInit = f; }
static inline bool InRuby() { return g_fInRuby; }
static inline void SetInRuby(bool f) { g_fInRuby = f; }
void Destroy();
private:
static CInitializer GlobalInitializer;
static bool g_fInRuby;
CComAutoCriticalSection m_crit;
DWORD m_dwRubyThread;
bool m_fInit;
};
#endif