diff options
author | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2007-04-13 10:24:35 +0000 |
---|---|---|
committer | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2007-04-13 10:24:35 +0000 |
commit | 02790d89e0aba89c98a3d897a3bf51b87b2d2e75 (patch) | |
tree | 4176550507b2eee92a5d9a81ad6d567650f17f8b | |
parent | cdef5bdf883c3df946d48d5ff6b0bd7ec5ca188d (diff) | |
download | lighttpd-02790d89e0aba89c98a3d897a3bf51b87b2d2e75.tar.gz |
introduced USE_GTHREAD_SENDFILE, as it only works on linux right now
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@1758 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | src/network.c | 4 | ||||
-rw-r--r-- | src/network_gthread_sendfile.c | 2 | ||||
-rw-r--r-- | src/server.c | 2 | ||||
-rw-r--r-- | src/settings.h | 7 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/network.c b/src/network.c index 55601b1e..6ab95e51 100644 --- a/src/network.c +++ b/src/network.c @@ -460,7 +460,7 @@ int network_init(server *srv) { #endif #if defined USE_GTHREAD_AIO { NETWORK_BACKEND_GTHREAD_AIO, "gthread-aio" }, -#if defined USE_LINUX_SENDFILE +#if defined USE_GTHREAD_SENDFILE { NETWORK_BACKEND_GTHREAD_SENDFILE, "gthread-sendfile" }, #endif #endif @@ -569,7 +569,7 @@ int network_init(server *srv) { SET_NETWORK_BACKEND(read, gthreadaio); break; -#ifdef USE_LINUX_SENDFILE +#ifdef USE_GTHREAD_SENDFILE case NETWORK_BACKEND_GTHREAD_SENDFILE: SET_NETWORK_BACKEND(read, gthreadsendfile); break; diff --git a/src/network_gthread_sendfile.c b/src/network_gthread_sendfile.c index ffa090e5..39058a25 100644 --- a/src/network_gthread_sendfile.c +++ b/src/network_gthread_sendfile.c @@ -3,7 +3,7 @@ */ #include "settings.h" #include "network_backends.h" -#ifdef USE_GTHREAD_AIO +#if defined(USE_GTHREAD_SENDFILE) #include <sys/types.h> #include <sys/stat.h> #ifdef HAVE_SYS_TIME_H diff --git a/src/server.c b/src/server.c index da7b6983..f381ffda 100644 --- a/src/server.c +++ b/src/server.c @@ -1641,6 +1641,7 @@ int main (int argc, char **argv, char **envp) { } need_joblist_queue_thread = 1; break; +#ifdef USE_GTHREAD_SENDFILE case NETWORK_BACKEND_GTHREAD_SENDFILE: aio_write_threads = calloc(srv->srvconf.max_read_threads, sizeof(*aio_write_threads)); for (i = 0; i < srv->srvconf.max_read_threads; i++) { @@ -1653,6 +1654,7 @@ int main (int argc, char **argv, char **envp) { } need_joblist_queue_thread = 1; break; +#endif #ifdef USE_POSIX_AIO case NETWORK_BACKEND_POSIX_AIO: srv->posix_aio_iocbs = calloc(srv->srvconf.max_read_threads, sizeof(*srv->posix_aio_iocbs)); diff --git a/src/settings.h b/src/settings.h index 4744179d..5a5877a2 100644 --- a/src/settings.h +++ b/src/settings.h @@ -47,8 +47,11 @@ /* all the Async IO backends need GTHREAD support */ #if defined(USE_GTHREAD) -# if defined(USE_LINUX_SENDFILE) && defined(HAVE_LIBAIO_H) -# define USE_LINUX_AIO_SENDFILE +# if defined(USE_LINUX_SENDFILE) +# if defined(HAVE_LIBAIO_H) +# define USE_LINUX_AIO_SENDFILE +# endif +# define USE_GTHREAD_SENDFILE # endif # if defined(HAVE_AIO_H) && (!defined(__FreeBSD__)) /* FreeBSD has no SIGEV_THREAD for us */ |