IOV: store buffer using void data type instead of char

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
IOV: store buffer type changed to void in function '_mk_iov_set_free'
Merge pull request #120 from tssavita/iov_patch2

IOV: store buffer type from char changed to void in function 'void _mk_iov_set_free'
Vhost: skip files ending in '~' (editor backups)

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Epoll: when adding a new FD, return status value

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Memory: upgrade Jemalloc to 3.6.0

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Merge branch 'master' of github.com:monkey/monkey
Scheduler: Moving and renaming function mk_sched_worker_info() to mk_plugin_sched_get_thread_conf
Merge pull request #122 from tssavita/sched_plugin

Scheduler-Plugin: Moving and renaming function mk_sched_worker_info()
Systemd: add unit file monkey.service

This patch adds a unit file for systemd init system, as described in issue #39.
The installation of the unit file is triggered by the "--systemddir" passed to configure script, in the following way:
$ ./configure                           # no systemd unit file deployed
$ ./configure --systemddir              # Unit file systemd.service is created with default installation path "/lib/systemd/system"
$ ./configure --systemddir=CUSTOM_PATH  # Unit file systemd.service is created with installation path "CUSTOM_PATH"

The unit file is deployed is deployed using "make install" command, so you should also specify "--prefix" option for configure.

I tested the patch on archlinux and fedora (systemd init system) deploying the unit file in different system paths. The following commands were successful:
$ service monkey start
$ systemctl start monkey.service

I also tested on ubuntu (upstart init system), ensuring nothing is broken.

Signed-off-by: Vladimir Cernov <gg.kaspersky@gmail.com>
Merge pull request #123 from kaspersky/systemd

Systemd: add unit file monkey.service
Merge pull request #115 from kaspersky/master

Monkey configuration: add program options for configuration paths
Socket: handle new Kernel 3.14 tcp_autocorking feature.

the server use the TCP_CORK feature to instruct the Kernel to
wait for some data before dispatch it on the socket buffer. This
is a common approach when sending HTTP response headers and then
a content body (file data).

The Linux Kernel 3.14 introduce a new feature called 'tcp autocorking',
it basically do TCP_CORK by default based on specific conditions of
each socket status. This is a good approach to let the Kernel to decide
when it can be used and also it avoid user space to invoke two system
calls to enable/disable the TCP_CORK.

This patch makes the Server to validate if the new feature exists on the
running Kernel and if is enabled, it will disable all manual corking done,
for more details about how it works at Kernel level refer to the following
patch:

    http://goo.gl/AMFIuI

Note: on an older Kernel it will continue working as usual.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
HTTP: Fix comments' grammar and punctuation in mk_http.c
Merge pull request #125 from TamerTas/master

HTTP: Fix comments' grammar and punctuation in mk_http.c
Removing unnecessary conditionals from src/mk_http.c
Merge pull request #127 from tssavita/http-conditionals

HTTP: Removing unnecessary conditionals from src/mk_http.c
Reporting when event EPOLLRDHUP occurs in a file descriptor registered in an epoll instance
Merge pull request #128 from tssavita/patch1_epoll

Epoll: Reporting when event EPOLLRDHUP occurs for an fd
Kernel: new interface to query Linux Kernel version.

This patch implements two things:

  1. Macro MK_KERNEL_VERSION() to return an unique representative integer
     of the Linux Kernel version given the 3 common values.
  2. Function mk_kernel_version() that returns the Kernel version from
     the running system.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>