summaryrefslogtreecommitdiff
path: root/rts/win32/AsyncWinIO.h
blob: 145fc862577d2b9453a9a4487dc192b62ab2285d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* AsyncIO.h
 *
 * Integrating Win32 asynchronous IOCP with the GHC RTS.
 *
 * (c) Tamar Christina, 2018
 *
 * NOTE: This is the WinIO manager, only used for --io-manager=native.
 *       For the MIO manager see AsyncIO.h.
 */

#pragma once

#include "Rts.h"
#include <stdbool.h>
#include <windows.h>

extern bool startupAsyncWinIO(void);
extern void shutdownAsyncWinIO(bool wait_threads);
extern void awaitAsyncRequests(bool wait);
extern void registerIOCPHandle (HANDLE port);
extern void registerAlertableWait (bool has_timeout, DWORD mssec);

extern OVERLAPPED_ENTRY* getOverlappedEntries (uint32_t *num);
extern void completeSynchronousRequest (void);
extern bool queueIOThread(void);