diff options
Diffstat (limited to 'src/vm/eventstore.hpp')
-rw-r--r-- | src/vm/eventstore.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/vm/eventstore.hpp b/src/vm/eventstore.hpp new file mode 100644 index 0000000000..9e53bb06f8 --- /dev/null +++ b/src/vm/eventstore.hpp @@ -0,0 +1,32 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + +#ifndef __EventStore_hpp +#define __EventStore_hpp + +#include "synch.h" + +class SyncBlock; +struct SLink; +struct WaitEventLink; + +typedef DPTR(WaitEventLink) PTR_WaitEventLink; + +// Used inside Thread class to chain all events that a thread is waiting for by Object::Wait +struct WaitEventLink { + SyncBlock *m_WaitSB; + CLREvent *m_EventWait; + PTR_Thread m_Thread; // Owner of this WaitEventLink. + PTR_WaitEventLink m_Next; // Chain to the next waited SyncBlock. + SLink m_LinkSB; // Chain to the next thread waiting on the same SyncBlock. + DWORD m_RefCount; // How many times Object::Wait is called on the same SyncBlock. +}; + +CLREvent* GetEventFromEventStore(); +void StoreEventToEventStore(CLREvent* hEvent); +void InitEventStore(); +void TerminateEventStore(); + +#endif |