Add poll/epoll compat layer for session daemon
authorDavid Goulet <david.goulet@polymtl.ca>
Fri, 9 Sep 2011 18:43:13 +0000 (14:43 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Thu, 15 Sep 2011 15:15:08 +0000 (11:15 -0400)
commit5eb91c9837a7b379a74e99358f0f9fb10011ef74
treee7d7bbe4593590026641816413d92a58981a3017
parent71615260f4e0d7a58bf64a837c081af2d155ef9d
Add poll/epoll compat layer for session daemon

This is a big modification of the session daemon code base. Every thread
is monitoring file descriptors using a poll set. This commit adds a
compat wrapper for the use of poll(2) or epoll(7) determined at compile
time on if the epoll API is available. Since epoll(7) is Linux specific,
the poll(2) fallback is necessary for portability.

By default, epoll(7) will be used having the --enable-epoll default to yes.
To use the poll(2) API, simply run with --disable-epoll when running
configure.

With this implementation, some fixes are also introduced.
  * Two missing notification to the consumer when the default channel is
created.
  * Memory and socket file descriptor leak when connect()/close() is
    done by the daemon alive check of the lttngctl API.
  * Root check (UID=0) on cleanup() before removing LTTNG_RUNDIR.
  * Comments here and there.

At this commit, tests were made on the CPU hot plug feature, multiple
UST registration at the same time and git tree tests. All passed for
poll(2) and epoll(7) implementation.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
include/lttng-share.h
include/lttng/lttng-kconsumerd.h
ltt-sessiond/Makefile.am
ltt-sessiond/compat/compat-epoll.c [new file with mode: 0644]
ltt-sessiond/compat/compat-poll.c [new file with mode: 0644]
ltt-sessiond/compat/poll.h [new file with mode: 0644]
ltt-sessiond/main.c
This page took 0.025365 seconds and 4 git commands to generate.