MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / main

Function main

libavutil/tests/cpu_init.c:38–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38int main(void)
39{
40 int cpu_flags1;
41 int cpu_flags2;
42 int ret;
43 pthread_t thread1;
44 pthread_t thread2;
45
46 if ((ret = pthread_create(&thread1, NULL, thread_main, &cpu_flags1))) {
47 fprintf(stderr, "pthread_create failed: %s.\n", strerror(ret));
48 return 1;
49 }
50 if ((ret = pthread_create(&thread2, NULL, thread_main, &cpu_flags2))) {
51 fprintf(stderr, "pthread_create failed: %s.\n", strerror(ret));
52 return 1;
53 }
54 pthread_join(thread1, NULL);
55 pthread_join(thread2, NULL);
56
57 if (cpu_flags1 < 0)
58 return 2;
59 if (cpu_flags2 < 0)
60 return 2;
61 if (cpu_flags1 != cpu_flags2)
62 return 3;
63
64 return 0;
65}

Callers

nothing calls this directly

Calls 2

pthread_createFunction · 0.50
pthread_joinFunction · 0.50

Tested by

no test coverage detected