summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-04-19 17:44:02 +0200
committerBen Gamari <ben@smart-cactus.org>2020-07-15 16:41:02 -0400
commitdc4381869748ec25ac9560bf7e89641b560b6862 (patch)
treee94493ff86d86f2a9fb191526cd14350dff12a36 /rts/win32
parent1d197f4bbe5bf6d7189c329a742917db3f67ad34 (diff)
downloadhaskell-dc4381869748ec25ac9560bf7e89641b560b6862.tar.gz
winio: Make last_event a local variable
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/AsyncWinIO.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/rts/win32/AsyncWinIO.c b/rts/win32/AsyncWinIO.c
index 1a4c6414ce..1010135eaa 100644
--- a/rts/win32/AsyncWinIO.c
+++ b/rts/win32/AsyncWinIO.c
@@ -145,7 +145,12 @@ volatile bool outstanding_service_requests = false;
/* Indicates wether we have hit one case where we serviced as much requests as
we could because the buffer got full. In such cases for the next requests
we expand the buffers so we have room to process requests in bigger
- batches. */
+ batches.
+ Set by:
+ runner
+ Read by:
+ servicedIOEntries
+*/
bool queue_full = false;
/* Timeout to use for the next alertable wait. INFINITE means never timeout.
@@ -164,8 +169,6 @@ CONDITION_VARIABLE wakeEvent;
/* Conditional variable to force the system thread to wait for a request to
complete. */
CONDITION_VARIABLE threadIOWait;
-/* The last event that was sent to the I/O manager. */
-HsWord32 lastEvent = 0;
/* Number of callbacks to reserve slots for in ENTRIES. This is also the
total number of concurrent I/O requests we can handle in one go. */
@@ -384,6 +387,8 @@ void servicedIOEntries (uint64_t remaining)
DWORD WINAPI runner (LPVOID lpParam STG_UNUSED)
{
+ /* The last event that was sent to the I/O manager. */
+ HsWord32 lastEvent = 0;
while (running)
{
AcquireSRWLockExclusive (&lock);