summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/emscripten/system/lib/pthread/proxying_stub.c
blob: bd1058ca46e88f45b96f2817a44dc2b75e240e5b (plain) (blame)
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
/*
 * Copyright 2022 The Emscripten Authors.  All rights reserved.
 * Emscripten is available under two separate licenses, the MIT license and the
 * University of Illinois/NCSA Open Source License.  Both these licenses can be
 * found in the LICENSE file.
 */

// Stub implementation of the proxying queue API that does nothing, for use in
// single-threaded builds.

#include <stdlib.h>
#include <emscripten/proxying.h>

em_proxying_queue* em_proxying_queue_create() {
  return NULL;
}

void em_proxying_queue_destroy(em_proxying_queue* q) {}

em_proxying_queue* emscripten_proxy_get_system_queue() {
  return NULL;
}

void emscripten_proxy_execute_queue(em_proxying_queue* q) { abort(); }

void emscripten_proxy_finish(em_proxying_ctx* ctx) { abort(); }

int emscripten_proxy_async(em_proxying_queue* q,
                           pthread_t target_thread,
                           void (*func)(void*),
                           void* arg) {
  abort();
}

int emscripten_proxy_sync(em_proxying_queue* q,
                          pthread_t target_thread,
                          void (*func)(void*),
                          void* arg) {
  abort();
}

int emscripten_proxy_sync_with_ctx(em_proxying_queue* q,
                                   pthread_t target_thread,
                                   void (*func)(em_proxying_ctx*, void*),
                                   void* arg) {
  abort();
}