… | |
… | |
201 | |
201 | |
202 | #if HAVE_UTIMES |
202 | #if HAVE_UTIMES |
203 | # include <utime.h> |
203 | # include <utime.h> |
204 | #endif |
204 | #endif |
205 | |
205 | |
|
|
206 | #if HAVE_SYS_SYSCALL_H |
|
|
207 | # include <sys/syscall.h> |
|
|
208 | #endif |
|
|
209 | |
|
|
210 | #if HAVE_SYS_PRCTL_H |
|
|
211 | # include <sys/prctl.h> |
|
|
212 | #endif |
|
|
213 | |
206 | #if HAVE_SENDFILE |
214 | #if HAVE_SENDFILE |
207 | # if __linux |
215 | # if __linux |
208 | # include <sys/sendfile.h> |
216 | # include <sys/sendfile.h> |
209 | # elif __FreeBSD__ || defined __APPLE__ |
217 | # elif __FreeBSD__ || defined __APPLE__ |
210 | # include <sys/socket.h> |
218 | # include <sys/socket.h> |
… | |
… | |
214 | # elif __solaris |
222 | # elif __solaris |
215 | # include <sys/sendfile.h> |
223 | # include <sys/sendfile.h> |
216 | # else |
224 | # else |
217 | # error sendfile support requested but not available |
225 | # error sendfile support requested but not available |
218 | # endif |
226 | # endif |
219 | #endif |
|
|
220 | |
|
|
221 | #if HAVE_SYS_SYSCALL_H |
|
|
222 | # include <sys/syscall.h> |
|
|
223 | #endif |
227 | #endif |
224 | |
228 | |
225 | #ifndef D_TYPE |
229 | #ifndef D_TYPE |
226 | # define D_TYPE(de) 0 |
230 | # define D_TYPE(de) 0 |
227 | #endif |
231 | #endif |
… | |
… | |
1913 | { |
1917 | { |
1914 | ETP_REQ *req; |
1918 | ETP_REQ *req; |
1915 | struct timespec ts; |
1919 | struct timespec ts; |
1916 | etp_worker *self = (etp_worker *)thr_arg; |
1920 | etp_worker *self = (etp_worker *)thr_arg; |
1917 | |
1921 | |
|
|
1922 | #if HAVE_PRCTL_SET_NAME |
|
|
1923 | prctl (PR_SET_NAME, (unsigned long)"eio_thread", 0, 0, 0); |
|
|
1924 | #endif |
|
|
1925 | |
1918 | /* try to distribute timeouts somewhat evenly */ |
1926 | /* try to distribute timeouts somewhat evenly */ |
1919 | ts.tv_nsec = ((unsigned long)self & 1023UL) * (1000000000UL / 1024UL); |
1927 | ts.tv_nsec = ((unsigned long)self & 1023UL) * (1000000000UL / 1024UL); |
1920 | |
1928 | |
1921 | for (;;) |
1929 | for (;;) |
1922 | { |
1930 | { |