1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | |
5 | |
6 | #ifndef __EventStore_hpp |
7 | #define __EventStore_hpp |
8 | |
9 | #include "synch.h" |
10 | |
11 | class SyncBlock; |
12 | struct SLink; |
13 | struct WaitEventLink; |
14 | |
15 | typedef DPTR(WaitEventLink) PTR_WaitEventLink; |
16 | |
17 | // Used inside Thread class to chain all events that a thread is waiting for by Object::Wait |
18 | struct WaitEventLink { |
19 | SyncBlock *m_WaitSB; |
20 | CLREvent *m_EventWait; |
21 | PTR_Thread m_Thread; // Owner of this WaitEventLink. |
22 | PTR_WaitEventLink m_Next; // Chain to the next waited SyncBlock. |
23 | SLink m_LinkSB; // Chain to the next thread waiting on the same SyncBlock. |
24 | DWORD m_RefCount; // How many times Object::Wait is called on the same SyncBlock. |
25 | }; |
26 | |
27 | CLREvent* GetEventFromEventStore(); |
28 | void StoreEventToEventStore(CLREvent* hEvent); |
29 | void InitEventStore(); |
30 | void TerminateEventStore(); |
31 | |
32 | #endif |
33 | |