mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-16 10:40:58 +00:00
MINOR: threads: always place the clockid in the struct thread_info
It will be easier to deal with the internal API to always have it.
This commit is contained in:
parent
b81939cef0
commit
624dcbf41e
@ -50,6 +50,7 @@ enum { tid_bit = 1UL };
|
||||
enum { tid = 0 };
|
||||
|
||||
extern struct thread_info {
|
||||
clockid_t clock_id;
|
||||
/* pad to cache line (64B) */
|
||||
char __pad[0]; /* unused except to check remaining room */
|
||||
char __end[0] __attribute__((aligned(64)));
|
||||
|
@ -2500,6 +2500,8 @@ static void *run_thread_poll_loop(void *data)
|
||||
|
||||
#ifdef USE_THREAD
|
||||
pthread_getcpuclockid(pthread_self(), &thread_info[tid].clock_id);
|
||||
#else
|
||||
thread_info[tid].clock_id = CLOCK_THREAD_CPUTIME_ID;
|
||||
#endif
|
||||
|
||||
tv_update_date(-1,-1);
|
||||
|
Loading…
Reference in New Issue
Block a user