1#include <pthread.h>
2#include <stdio.h>
3#include <stdlib.h>
4
5void *f1(void *p) {
6 printf(format: "hello\n");
7 return NULL;
8}
9
10int main (int argc, char const *argv[])
11{
12 pthread_t t1;
13 pthread_create(newthread: &t1, NULL, start_routine: f1, NULL);
14
15 return 0;
16}
17

Provided by KDAB

Privacy Policy
Update your C++ knowledge – Modern C++11/14/17 Training
Find out more

source code of lldb/test/API/functionalities/tsan/thread_leak/main.c