diff options
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);  | 
