long tidx = (long)arg;
printf("thread_begin %s, thread id : %lx, tid %lu\n",
long tidx = (long)arg;
printf("thread_begin %s, thread id : %lx, tid %lu\n",
- "reader", pthread_self(), (unsigned long)gettid());
+ "reader", (unsigned long) pthread_self(),
+ (unsigned long) gettid());
sleep(2);
printf("thread_end %s, thread id : %lx, tid %lu\n",
sleep(2);
printf("thread_end %s, thread id : %lx, tid %lu\n",
- "reader", pthread_self(), (unsigned long)gettid());
+ "reader", (unsigned long) pthread_self(),
+ (unsigned long) gettid());
cycles_t time1, time2;
printf("thread_begin %s, thread id : %lx, tid %lu\n",
cycles_t time1, time2;
printf("thread_begin %s, thread id : %lx, tid %lu\n",
- "writer", pthread_self(), (unsigned long)gettid());
+ "writer", (unsigned long) pthread_self(),
+ (unsigned long) gettid());
}
printf("thread_end %s, thread id : %lx, tid %lu\n",
}
printf("thread_end %s, thread id : %lx, tid %lu\n",
- "writer", pthread_self(), (unsigned long)gettid());
+ "writer", (unsigned long) pthread_self(),
+ (unsigned long) gettid());
tid_writer = malloc(sizeof(*tid_writer) * num_write);
printf("thread %-6s, thread id : %lx, tid %lu\n",
tid_writer = malloc(sizeof(*tid_writer) * num_write);
printf("thread %-6s, thread id : %lx, tid %lu\n",
- "main", pthread_self(), (unsigned long)gettid());
+ "main", (unsigned long) pthread_self(),
+ (unsigned long) gettid());