aboutsummaryrefslogtreecommitdiff
path: root/tests/worker_api_worker.cpp
blob: 9a671a9197438628554905e0cd501d935d1740e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <assert.h>
#include <emscripten.h>

extern "C" {

void one(char *data, int size) {
  int *x = (int*)data;
  int num = size/sizeof(int);
  for (int i = 0; i < num; i++) {
    x[i] += 1234;
  }
  emscripten_worker_respond(data, size);
}

}