-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
ds-ipc-pal-namedpipe.h
69 lines (57 loc) · 1.65 KB
/
ds-ipc-pal-namedpipe.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef __DIAGNOSTICS_IPC_PAL_NAMEDPIPE_H__
#define __DIAGNOSTICS_IPC_PAL_NAMEDPIPE_H__
#include "ds-rt-config.h"
#ifdef ENABLE_PERFTRACING
#ifdef HOST_WIN32
#include "ds-ipc-pal.h"
#undef DS_IMPL_GETTER_SETTER
#ifdef DS_IMPL_IPC_PAL_NAMEDPIPE_GETTER_SETTER
#define DS_IMPL_GETTER_SETTER
#endif
#include "ds-getter-setter.h"
#include <Windows.h>
/*
* DiagnosticsIpc.
*/
#define DS_IPC_WIN32_MAX_NAMED_PIPE_LEN 256
#if defined(DS_INLINE_GETTER_SETTER) || defined(DS_IMPL_IPC_PAL_NAMEDPIPE_GETTER_SETTER)
struct _DiagnosticsIpc {
#else
struct _DiagnosticsIpc_Internal {
#endif
ep_char8_t pipe_name [DS_IPC_WIN32_MAX_NAMED_PIPE_LEN];
OVERLAPPED overlap;
HANDLE pipe;
// This handle roots the ownership of the pipe from first listen until it
// all sessions are closed.
HANDLE owningPipe;
bool is_listening;
DiagnosticsIpcConnectionMode mode;
};
#if !defined(DS_INLINE_GETTER_SETTER) && !defined(DS_IMPL_IPC_PAL_NAMEDPIPE_GETTER_SETTER)
struct _DiagnosticsIpc {
uint8_t _internal [sizeof (struct _DiagnosticsIpc_Internal)];
};
#endif
/*
* DiagnosticsIpcStream.
*/
#if defined(DS_INLINE_GETTER_SETTER) || defined(DS_IMPL_IPC_PAL_NAMEDPIPE_GETTER_SETTER)
struct _DiagnosticsIpcStream {
#else
struct _DiagnosticsIpcStream_Internal {
#endif
IpcStream stream;
OVERLAPPED overlap;
HANDLE pipe;
bool is_test_reading;
DiagnosticsIpcConnectionMode mode;
};
#if !defined(DS_INLINE_GETTER_SETTER) && !defined(DS_IMPL_IPC_PAL_NAMEDPIPE_GETTER_SETTER)
struct _DiagnosticsIpcStream {
uint8_t _internal [sizeof (struct _DiagnosticsIpcStream_Internal)];
};
#endif
#endif /* HOST_WIN32 */
#endif /* ENABLE_PERFTRACING */
#endif /* __DIAGNOSTICS_IPC_PAL_NAMEDPIPE_H__ */