diff options
author | root <root> | 2011-07-24 05:53:34 +0000 |
---|---|---|
committer | root <root> | 2011-07-24 05:53:34 +0000 |
commit | f5975d60cfe2e7d1b6c259f5ad800a823ee682c3 (patch) | |
tree | f2a4b2445d10952a74a0905dee513524303a6163 /eio.c | |
parent | 95c2bf9fb4cfcbceebac121d5a5a0d702af25cef (diff) |
*** empty log message ***
Diffstat (limited to 'eio.c')
-rw-r--r-- | eio.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -203,6 +203,14 @@ static void eio_destroy (eio_req *req); # include <utime.h> #endif +#if HAVE_SYS_SYSCALL_H +# include <sys/syscall.h> +#endif + +#if HAVE_SYS_PRCTL_H +# include <sys/prctl.h> +#endif + #if HAVE_SENDFILE # if __linux # include <sys/sendfile.h> @@ -218,10 +226,6 @@ static void eio_destroy (eio_req *req); # endif #endif -#if HAVE_SYS_SYSCALL_H -# include <sys/syscall.h> -#endif - #ifndef D_TYPE # define D_TYPE(de) 0 #endif @@ -1915,6 +1919,10 @@ X_THREAD_PROC (etp_proc) struct timespec ts; etp_worker *self = (etp_worker *)thr_arg; +#if HAVE_PRCTL_SET_NAME + prctl (PR_SET_NAME, (unsigned long)"eio_thread", 0, 0, 0); +#endif + /* try to distribute timeouts somewhat evenly */ ts.tv_nsec = ((unsigned long)self & 1023UL) * (1000000000UL / 1024UL); |