MINOR: init/threads: make the threads array global

Currently the thread array is a local variable inside a function block
and there is no access to it from outside, which often complicates
debugging. Let's make it global and export it. Also the allocation
return is now checked.
This commit is contained in:
Willy Tarreau
2019-05-03 09:22:44 +02:00
parent b4f7cc3839
commit c40efc1919
2 changed files with 12 additions and 2 deletions

View File

@@ -242,6 +242,7 @@ extern int master; /* 1 if in master, 0 otherwise */
extern unsigned int rlim_fd_cur_at_boot;
extern unsigned int rlim_fd_max_at_boot;
extern int atexit_flag;
__decl_hathreads(extern pthread_t *threads);
/* bit values to go with "warned" above */
#define WARN_BLOCK_DEPRECATED 0x00000001