blob: 7b1a46e2f389a411eae2c5f29019799f2141b0ba [file] [log] [blame]
#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
}