CommonLibVR
GAtomic.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "REX/W32/BASE.h"
4 
5 namespace RE
6 {
7  class GLock
8  {
9  public:
10  class Locker
11  {
12  public:
13  Locker(GLock* a_lock);
15 
16  // members
17  GLock* lock; // 0
18  };
19  static_assert(sizeof(Locker) == 0x8);
20 
21  GLock(std::uint32_t a_spinCount = 0);
22  ~GLock();
23 
24  void operator delete(void*) = delete;
25 
26  void Lock();
27  void Unlock();
28 
29  // members
31  private:
32  KEEP_FOR_RE()
33  };
34  static_assert(sizeof(GLock) == 0x28);
35 
36  template <class T>
38  {
39  public:
40  // members
41  volatile T value; // 0
42  };
43  //static_assert(sizeof(GAtomicValueBase<std::int32_t>) == 0x4);
44 
45  template <class T>
46  class GAtomicInt : public GAtomicValueBase<T> // 0
47  {
48  public:
49  };
50  //static_assert(sizeof(GAtomicInt<std::int32_t>) == 0x4);
51 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: GAtomic.h:47
Definition: GAtomic.h:38
volatile T value
Definition: GAtomic.h:41
Definition: GAtomic.h:11
GLock * lock
Definition: GAtomic.h:17
Locker(GLock *a_lock)
Definition: GAtomic.h:8
GLock(std::uint32_t a_spinCount=0)
REX::W32::CRITICAL_SECTION cs
Definition: GAtomic.h:30
void Unlock()
void Lock()
Definition: AbsorbEffect.h:6
Definition: BASE.h:137