comparison src/os/unix/ngx_thread.h @ 7323:d230c797b168

Fixed NGX_TID_T_FMT format specification for uint64_t. Previously, "%uA" was used, which corresponds to ngx_atomic_uint_t. Size of ngx_atomic_uint_t can be easily different from uint64_t, leading to undefined results.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 22 Jul 2018 04:03:40 +0300
parents ac7c7241ed8c
children
comparison
equal deleted inserted replaced
7322:6649d4433266 7323:d230c797b168
45 #define NGX_TID_T_FMT "%uD" 45 #define NGX_TID_T_FMT "%uD"
46 46
47 #elif (NGX_DARWIN) 47 #elif (NGX_DARWIN)
48 48
49 typedef uint64_t ngx_tid_t; 49 typedef uint64_t ngx_tid_t;
50 #define NGX_TID_T_FMT "%uA" 50 #define NGX_TID_T_FMT "%uL"
51 51
52 #else 52 #else
53 53
54 typedef uint64_t ngx_tid_t; 54 typedef uint64_t ngx_tid_t;
55 #define NGX_TID_T_FMT "%uA" 55 #define NGX_TID_T_FMT "%uL"
56 56
57 #endif 57 #endif
58 58
59 ngx_tid_t ngx_thread_tid(void); 59 ngx_tid_t ngx_thread_tid(void);
60 60