… | |
… | |
35 | * and other provisions required by the GPL. If you do not delete the |
35 | * and other provisions required by the GPL. If you do not delete the |
36 | * provisions above, a recipient may use your version of this file under |
36 | * provisions above, a recipient may use your version of this file under |
37 | * either the BSD or the GPL. |
37 | * either the BSD or the GPL. |
38 | */ |
38 | */ |
39 | |
39 | |
40 | #if HAVE_SYS_PRCTL_H |
|
|
41 | # include <sys/prctl.h> |
|
|
42 | #endif |
|
|
43 | |
|
|
44 | #ifdef EIO_STACKSIZE |
|
|
45 | # define X_STACKSIZE EIO_STACKSIZE |
|
|
46 | #endif |
|
|
47 | #include "xthread.h" |
|
|
48 | |
|
|
49 | #ifndef ETP_API_DECL |
40 | #ifndef ETP_API_DECL |
50 | # define ETP_API_DECL static |
41 | # define ETP_API_DECL static |
51 | #endif |
42 | #endif |
52 | |
43 | |
53 | #ifndef ETP_PRI_MIN |
44 | #ifndef ETP_PRI_MIN |
… | |
… | |
318 | static void ecb_noinline ecb_cold |
309 | static void ecb_noinline ecb_cold |
319 | etp_proc_init (void) |
310 | etp_proc_init (void) |
320 | { |
311 | { |
321 | #if HAVE_PRCTL_SET_NAME |
312 | #if HAVE_PRCTL_SET_NAME |
322 | /* provide a more sensible "thread name" */ |
313 | /* provide a more sensible "thread name" */ |
323 | char name[15 + 1]; |
314 | char name[16 + 1]; |
324 | const int namelen = sizeof (name) - 1; |
315 | const int namelen = sizeof (name) - 1; |
325 | int len; |
316 | int len; |
326 | |
317 | |
327 | prctl (PR_GET_NAME, (unsigned long)name, 0, 0, 0); |
318 | prctl (PR_GET_NAME, (unsigned long)name, 0, 0, 0); |
328 | name [namelen] = 0; |
319 | name [namelen] = 0; |