static void b(void *obj)
{
int r = atomic_load_explicit(&x, memory_order_acquire);
- printf("r = %u\n", r);
+ printf("r = %d\n", r);
printf("load %d\n", load_32(&var));
}
static void b2(void *obj)
{
int r = atomic_load_explicit(&x, memory_order_acquire);
- printf("r = %u\n", r);
+ printf("r = %d\n", r);
store_32(&var, 3);
}
thrd_t t3, t4;
int i = 7;
int r = atomic_load_explicit(&x, memory_order_acquire);
- printf("r = %u\n", r);
+ printf("r = %d\n", r);
store_32(&var, 2);
thrd_create(&t3, (thrd_start_t)&a, &i);
thrd_create(&t4, (thrd_start_t)&b2, NULL);
static void b(void *obj)
{
int r = atomic_load_explicit(&x, memory_order_acquire);
- printf("r = %u\n", r);
+ printf("r = %d\n", r);
printf("load %d\n", load_32(&var));
}
{
int r1=atomic_load_explicit(&y, memory_order_relaxed);
atomic_store_explicit(&x, r1, memory_order_relaxed);
- printf("r1=%u\n",r1);
+ printf("r1=%d\n",r1);
}
static void b(void *obj)
{
int r2=atomic_load_explicit(&x, memory_order_relaxed);
atomic_store_explicit(&y, 42, memory_order_relaxed);
- printf("r2=%u\n",r2);
+ printf("r2=%d\n",r2);
}
int user_main(int argc, char **argv)