4
4
* University of Illinois/NCSA Open Source License. Both these licenses can be
5
5
* found in the LICENSE file.
6
6
*
7
- * Define REPORT_RESULT and REPORT_RESULT_SYNC for using in test code
7
+ * Define REPORT_RESULT for using in test code
8
8
*/
9
9
10
10
#ifndef REPORT_RESULT_H_
16
16
extern "C" {
17
17
#endif
18
18
19
- void _ReportResult (int result , int sync );
20
- void _MaybeReportResult (int result , int sync );
19
+ void _ReportResult (int result );
20
+ void _MaybeReportResult (int result );
21
21
22
22
#ifdef __cplusplus
23
23
}
@@ -26,15 +26,11 @@ void _MaybeReportResult(int result, int sync);
26
26
#if defined __EMSCRIPTEN__ && defined __EMSCRIPTEN_PTHREADS__ && !defined(__EMSCRIPTEN_WASM_WORKERS__ )
27
27
#include <emscripten.h>
28
28
#include <emscripten/threading.h>
29
- #define REPORT_RESULT (result ) emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VII, _ReportResult, (result), 0)
30
- #define REPORT_RESULT_SYNC (result ) emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VII, _ReportResult, (result), 1)
31
- #define MAYBE_REPORT_RESULT (result ) emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VII, _MaybeReportResult, (result), 0)
32
- #define MAYBE_REPORT_RESULT_SYNC (result ) emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VII, _MaybeReportResult, (result), 1)
29
+ #define REPORT_RESULT (result ) emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VI, _ReportResult, (result))
30
+ #define MAYBE_REPORT_RESULT (result ) emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VI, _MaybeReportResult, (result))
33
31
#else
34
- #define REPORT_RESULT (result ) _ReportResult((result), 0)
35
- #define REPORT_RESULT_SYNC (result ) _ReportResult((result), 1)
36
- #define MAYBE_REPORT_RESULT (result ) _MaybeReportResult((result), 0)
37
- #define MAYBE_REPORT_RESULT_SYNC (result ) _MaybeReportResult((result), 1)
32
+ #define REPORT_RESULT (result ) _ReportResult((result))
33
+ #define MAYBE_REPORT_RESULT (result ) _MaybeReportResult((result))
38
34
#endif
39
35
40
36
#endif
0 commit comments