forked from https-github-com-Surachai-kent/runtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathds-rt.h
More file actions
170 lines (129 loc) · 4.77 KB
/
ds-rt.h
File metadata and controls
170 lines (129 loc) · 4.77 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#ifndef __DIAGNOSTICS_RT_H__
#define __DIAGNOSTICS_RT_H__
#ifdef ENABLE_PERFTRACING
#include "ep-rt.h"
#include "ds-rt-config.h"
#include "ds-types.h"
#define DS_LOG_ALWAYS_0(msg) ds_rt_redefine
#define DS_LOG_ALWAYS_1(msg, data1) ds_rt_redefine
#define DS_LOG_ALWAYS_2(msg, data1, data2) ds_rt_redefine
#define DS_LOG_INFO_0(msg) ds_rt_redefine
#define DS_LOG_INFO_1(msg, data1) ds_rt_redefine
#define DS_LOG_INFO_2(msg, data1, data2) ds_rt_redefine
#define DS_LOG_ERROR_0(msg) ds_rt_redefine
#define DS_LOG_ERROR_1(msg, data1) ds_rt_redefine
#define DS_LOG_ERROR_2(msg, data1, data2) ds_rt_redefine
#define DS_LOG_WARNING_0(msg) ds_rt_redefine
#define DS_LOG_WARNING_1(msg, data1) ds_rt_redefine
#define DS_LOG_WARNING_2(msg, data1, data2) ds_rt_redefine
#define DS_LOG_DEBUG_0(msg) ds_rt_redefine
#define DS_LOG_DEBUG_1(msg, data1) ds_rt_redefine
#define DS_LOG_DEBUG_2(msg, data1, data2) ds_rt_redefine
#define DS_ENTER_BLOCKING_PAL_SECTION ds_rt_redefine
#define DS_EXIT_BLOCKING_PAL_SECTION ds_rt_redefine
#define DS_RT_DECLARE_ARRAY(array_name, array_type, iterator_type, item_type) \
EP_RT_DECLARE_ARRAY_PREFIX(ds, array_name, array_type, iterator_type, item_type)
#define DS_RT_DEFINE_ARRAY ds_rt_redefine
#define DS_RT_DECLARE_LOCAL_ARRAY(array_name, array_type, iterator_type, item_type) \
EP_RT_DECLARE_LOCAL_ARRAY_PREFIX(ds, array_name, array_type, iterator_type, item_type)
#define DS_RT_DEFINE_LOCAL_ARRAY ds_rt_redefine
#define DS_RT_DECLARE_ARRAY_ITERATOR(array_name, array_type, iterator_type, item_type) \
EP_RT_DECLARE_ARRAY_ITERATOR_PREFIX(ds, array_name, array_type, iterator_type, item_type)
#define DS_RT_DEFINE_ARRAY_ITERATOR ds_rt_redefine
#define DS_RT_DECLARE_ARRAY_REVERSE_ITERATOR(array_name, array_type, iterator_type, item_type) \
EP_RT_DECLARE_ARRAY_REVERSE_ITERATOR_PREFIX(ds, array_name, array_type, iterator_type, item_type)
#define DS_RT_DEFINE_ARRAY_REVERSE_ITERATOR ds_rt_redefine
/*
* AutoTrace.
*/
static
void
ds_rt_auto_trace_init (void);
static
void
ds_rt_auto_trace_launch (void);
static
void
ds_rt_auto_trace_signal (void);
static
void
ds_rt_auto_trace_wait (void);
/*
* DiagnosticsConfiguration.
*/
static
bool
ds_rt_config_value_get_enable (void);
static
ep_char8_t *
ds_rt_config_value_get_ports (void);
static
uint32_t
ds_rt_config_value_get_default_port_suspend (void);
/*
* DiagnosticsDump.
*/
static
ds_ipc_result_t
ds_rt_generate_core_dump (DiagnosticsDumpCommandId commandId, DiagnosticsGenerateCoreDumpCommandPayload *payload, ep_char8_t *errorMessageBuffer, int32_t cbErrorMessageBuffer);
/*
* DiagnosticsIpc.
*/
static
bool
ds_rt_transport_get_default_name (
ep_char8_t *name,
int32_t name_len,
const ep_char8_t *prefix,
int32_t id,
const ep_char8_t *group_id,
const ep_char8_t *suffix);
/*
* DiagnosticsIpcPollHandle.
*/
DS_RT_DECLARE_ARRAY (ipc_poll_handle_array, ds_rt_ipc_poll_handle_array_t, ds_rt_ipc_poll_handle_array_iterator_t, DiagnosticsIpcPollHandle)
DS_RT_DECLARE_LOCAL_ARRAY (ipc_poll_handle_array, ds_rt_ipc_poll_handle_array_t, ds_rt_ipc_poll_handle_array_iterator_t, DiagnosticsIpcPollHandle)
DS_RT_DECLARE_ARRAY_ITERATOR (ipc_poll_handle_array, ds_rt_ipc_poll_handle_array_t, ds_rt_ipc_poll_handle_array_iterator_t, DiagnosticsIpcPollHandle)
#define DS_RT_DECLARE_LOCAL_IPC_POLL_HANDLE_ARRAY(var_name) ds_rt_redefine
/*
* DiagnosticsPort.
*/
DS_RT_DECLARE_ARRAY (port_array, ds_rt_port_array_t, ds_rt_port_array_iterator_t, DiagnosticsPort *)
DS_RT_DECLARE_ARRAY_ITERATOR (port_array, ds_rt_port_array_t, ds_rt_port_array_iterator_t, DiagnosticsPort *)
DS_RT_DECLARE_ARRAY (port_config_array, ds_rt_port_config_array_t, ds_rt_port_config_array_iterator_t, ep_char8_t *)
DS_RT_DECLARE_LOCAL_ARRAY (port_config_array, ds_rt_port_config_array_t, ds_rt_port_config_array_iterator_t, ep_char8_t *)
DS_RT_DECLARE_ARRAY_ITERATOR (port_config_array, ds_rt_port_config_array_t, ds_rt_port_config_array_iterator_t, ep_char8_t *)
DS_RT_DECLARE_ARRAY_REVERSE_ITERATOR (port_config_array, ds_rt_port_config_array_t, ds_rt_port_config_array_reverse_iterator_t, ep_char8_t *)
#define DS_RT_DECLARE_LOCAL_PORT_CONFIG_ARRAY(var_name) ds_rt_redefine
/*
* DiagnosticsProfiler.
*/
static
uint32_t
ds_rt_profiler_attach (DiagnosticsAttachProfilerCommandPayload *payload);
static
uint32_t
ds_rt_profiler_startup (DiagnosticsStartupProfilerCommandPayload *payload);
/*
* Environment variables
*/
static
uint32_t
ds_rt_set_environment_variable (const ep_char16_t *name, const ep_char16_t *value);
static
uint32_t
ds_rt_get_environment_variable (const ep_char16_t *name,
uint32_t valueBufferLength,
uint32_t *valueLengthOut,
ep_char16_t *valueBuffer);
/*
* DiagnosticServer.
*/
static
void
ds_rt_server_log_pause_message (void);
#ifndef EP_NO_RT_DEPENDENCY
#include DS_RT_H
#endif
#endif /* ENABLE_PERFTRACING */
#endif /* __DIAGNOSTICS_RT_H__ */