Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/system/lib/pthread/proxying_stub.c
6174 views
1
/*
2
* Copyright 2022 The Emscripten Authors. All rights reserved.
3
* Emscripten is available under two separate licenses, the MIT license and the
4
* University of Illinois/NCSA Open Source License. Both these licenses can be
5
* found in the LICENSE file.
6
*/
7
8
// Stub implementation of the proxying queue API that does nothing, for use in
9
// single-threaded builds.
10
11
#include <stdlib.h>
12
#include <emscripten/proxying.h>
13
14
em_proxying_queue* em_proxying_queue_create() {
15
return NULL;
16
}
17
18
void em_proxying_queue_destroy(em_proxying_queue* q) {}
19
20
em_proxying_queue* emscripten_proxy_get_system_queue() {
21
return NULL;
22
}
23
24
void emscripten_proxy_execute_queue(em_proxying_queue* q) { abort(); }
25
26
void emscripten_proxy_finish(em_proxying_ctx* ctx) { abort(); }
27
28
int emscripten_proxy_async(em_proxying_queue* q,
29
pthread_t target_thread,
30
void (*func)(void*),
31
void* arg) {
32
abort();
33
}
34
35
int emscripten_proxy_sync(em_proxying_queue* q,
36
pthread_t target_thread,
37
void (*func)(void*),
38
void* arg) {
39
abort();
40
}
41
42
int emscripten_proxy_sync_with_ctx(em_proxying_queue* q,
43
pthread_t target_thread,
44
void (*func)(em_proxying_ctx*, void*),
45
void* arg) {
46
abort();
47
}
48
49