BUG/MINOR: debug: properly use long long instead of long for the thread ID

I changed my mind twice on this one and pushed after the last test with
threads disabled, without re-enabling long long, causing this rightful
build warning.

This needs to be backported if the previous commit ff64d3b027 ("MINOR:
threads: export the POSIX thread ID in panic dumps") is backported as
well.
This commit is contained in:
Willy Tarreau 2020-05-01 12:26:03 +02:00
parent ff64d3b027
commit f0e5da20e1
2 changed files with 2 additions and 2 deletions

View File

@ -170,7 +170,7 @@ static inline void ha_set_tid(unsigned int tid)
ti = &ha_thread_info[tid];
}
static inline unsigned long ha_get_pthread_id(unsigned int thr)
static inline unsigned long long ha_get_pthread_id(unsigned int thr)
{
return 0;
}

View File

@ -58,7 +58,7 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid)
int stuck = !!(ha_thread_info[thr].flags & TI_FL_STUCK);
chunk_appendf(buf,
"%c%cThread %-2u: id=0x%lx act=%d glob=%d wq=%d rq=%d tl=%d tlsz=%d rqsz=%d\n"
"%c%cThread %-2u: id=0x%llx act=%d glob=%d wq=%d rq=%d tl=%d tlsz=%d rqsz=%d\n"
" stuck=%d prof=%d",
(thr == calling_tid) ? '*' : ' ', stuck ? '>' : ' ', thr + 1,
ha_get_pthread_id(thr),