[JITLink][LoongArch] Support R_LARCH_ALIGN relaxation (#122259)
[llvm-project.git] / lldb / test / API / functionalities / tsan / global_location / main.c
blob7c9fee297b30b340dd001347935387c5a6d20128
1 #include <pthread.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <unistd.h>
6 long my_global_variable; // global variable
8 void *f1(void *p) {
9 my_global_variable = 42;
10 return NULL;
13 void *f2(void *p) {
14 my_global_variable = 43;
15 return NULL;
18 int main (int argc, char const *argv[])
20 pthread_t t1;
21 pthread_create(&t1, NULL, f1, NULL);
23 pthread_t t2;
24 pthread_create(&t2, NULL, f2, NULL);
26 pthread_join(t1, NULL);
27 pthread_join(t2, NULL);
29 return 0;