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
11class SyncBlock;
12struct SLink;
13struct WaitEventLink;
14
15typedef DPTR(WaitEventLink) PTR_WaitEventLink;
16
17// Used inside Thread class to chain all events that a thread is waiting for by Object::Wait
18struct 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
27CLREvent* GetEventFromEventStore();
28void StoreEventToEventStore(CLREvent* hEvent);
29void InitEventStore();
30void TerminateEventStore();
31
32#endif
33