The Meson Build System http://mesonbuild.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
426 B

#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
void inthread(void * args) {
sleep(1);
printf("In thread\n");
}
int main() {
#ifdef __EMSCRIPTEN_PTHREADS__
pthread_t thread_id;
printf("Before Thread\n");
pthread_create(&thread_id, NULL, (void *)*inthread, NULL);
pthread_join(thread_id, NULL);
printf("After Thread\n");
return 0;
#else
# error "threads not enabled\n"
#endif
}