@@ -42,40 +42,11 @@ int emscripten_futex_wait(volatile void/*uint32_t*/ *addr, uint32_t val, double
42
42
// INT_MAX to wake all waiters on that location.
43
43
int emscripten_futex_wake (volatile void /*uint32_t*/ * addr , int count );
44
44
45
- typedef union em_variant_val
46
- {
47
- int i ;
48
- int64_t i64 ;
49
- float f ;
50
- double d ;
51
- void * vp ;
52
- char * cp ;
53
- } em_variant_val ;
54
-
55
- // Proxied C/C++ functions support at most this many arguments. Dispatch is
56
- // static/strongly typed by signature.
57
- #define EM_QUEUED_CALL_MAX_ARGS 11
58
45
// Proxied JS function can support a few more arguments than proxied C/C++
59
46
// functions, because the dispatch is variadic and signature independent.
60
47
#define EM_QUEUED_JS_CALL_MAX_ARGS 20
61
- typedef struct em_queued_call
62
- {
63
- int functionEnum ;
64
- void * functionPtr ;
65
- _Atomic uint32_t operationDone ;
66
- em_variant_val args [EM_QUEUED_JS_CALL_MAX_ARGS ];
67
- em_variant_val returnValue ;
68
-
69
- // An optional pointer to a secondary data block that should be free()d when
70
- // this queued call is freed.
71
- void * satelliteData ;
72
-
73
- // If true, the caller has "detached" itself from this call object and the
74
- // Emscripten main runtime thread should free up this em_queued_call object
75
- // after it has been executed. If false, the caller is in control of the
76
- // memory.
77
- int calleeDelete ;
78
- } em_queued_call ;
48
+
49
+ typedef struct em_queued_call em_queued_call ;
79
50
80
51
void emscripten_sync_run_in_main_thread (em_queued_call * call );
81
52
void * emscripten_sync_run_in_main_thread_0 (int function );
@@ -84,39 +55,6 @@ void *emscripten_sync_run_in_main_thread_2(int function, void *arg1, void *arg2)
84
55
void * emscripten_sync_run_in_main_thread_3 (int function , void * arg1 , void * arg2 , void * arg3 );
85
56
void * emscripten_sync_run_in_main_thread_7 (int function , void * arg1 , void * arg2 , void * arg3 , void * arg4 , void * arg5 , void * arg6 , void * arg7 );
86
57
87
- typedef void (* em_func_v )(void );
88
- typedef void (* em_func_vi )(int );
89
- typedef void (* em_func_vf )(float );
90
- typedef void (* em_func_vii )(int , int );
91
- typedef void (* em_func_vif )(int , float );
92
- typedef void (* em_func_vff )(float , float );
93
- typedef void (* em_func_viii )(int , int , int );
94
- typedef void (* em_func_viif )(int , int , float );
95
- typedef void (* em_func_viff )(int , float , float );
96
- typedef void (* em_func_vfff )(float , float , float );
97
- typedef void (* em_func_viiii )(int , int , int , int );
98
- typedef void (* em_func_viifi )(int , int , float , int );
99
- typedef void (* em_func_vifff )(int , float , float , float );
100
- typedef void (* em_func_vffff )(float , float , float , float );
101
- typedef void (* em_func_viiiii )(int , int , int , int , int );
102
- typedef void (* em_func_viffff )(int , float , float , float , float );
103
- typedef void (* em_func_viiiiii )(int , int , int , int , int , int );
104
- typedef void (* em_func_viiiiiii )(int , int , int , int , int , int , int );
105
- typedef void (* em_func_viiiiiiii )(int , int , int , int , int , int , int , int );
106
- typedef void (* em_func_viiiiiiiii )(int , int , int , int , int , int , int , int , int );
107
- typedef void (* em_func_viiiiiiiiii )(int , int , int , int , int , int , int , int , int , int );
108
- typedef void (* em_func_viiiiiiiiiii )(int , int , int , int , int , int , int , int , int , int , int );
109
- typedef int (* em_func_i )(void );
110
- typedef int (* em_func_ii )(int );
111
- typedef int (* em_func_iii )(int , int );
112
- typedef int (* em_func_iiii )(int , int , int );
113
- typedef int (* em_func_iiiii )(int , int , int , int );
114
- typedef int (* em_func_iiiiii )(int , int , int , int , int );
115
- typedef int (* em_func_iiiiiii )(int , int , int , int , int , int );
116
- typedef int (* em_func_iiiiiiii )(int , int , int , int , int , int , int );
117
- typedef int (* em_func_iiiiiiiii )(int , int , int , int , int , int , int , int );
118
- typedef int (* em_func_iiiiiiiiii )(int , int , int , int , int , int , int , int , int );
119
-
120
58
// Encode function signatures into a single uint32_t integer.
121
59
// N.B. This encoding scheme is internal to the implementation, and can change
122
60
// in the future. Do not depend on the exact numbers in this scheme.
0 commit comments