Skip to content

Commit

Permalink
[Core] Alignt event behaviour between Posix and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaszm committed Sep 20, 2023
1 parent 4b4f2f5 commit 5475c14
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Source/core/Sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ namespace Core {
#endif

#ifdef __WINDOWS__
m_syncEvent = ::CreateEvent(nullptr, blManualReset, blSet, nullptr);
m_syncEvent = ::CreateEvent(nullptr, TRUE, blSet, nullptr);

ASSERT(m_syncEvent != nullptr);
#endif
Expand Down Expand Up @@ -960,7 +960,7 @@ namespace Core {
#endif

#ifdef __WINDOWS__
::SetEvent(m_syncEvent);
::PulseEvent(m_syncEvent);
#endif

return (nResult);
Expand Down Expand Up @@ -1020,7 +1020,12 @@ namespace Core {
#endif

#ifdef __WINDOWS__
::SetEvent(m_syncEvent);
if (m_blManualReset == false) {
::PulseEvent(m_syncEvent);
}
else {
::SetEvent(m_syncEvent);
}
#endif
}

Expand Down

0 comments on commit 5475c14

Please sign in to comment.