Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
while (1) {
DBG("Listener accepting connections");
while (1) {
DBG("Listener accepting connections");
- /* Zeroed the events structure */
- lttng_poll_reset(&events);
-
- nb_fd = LTTNG_POLL_GETNB(&events);
-
restart:
ret = lttng_poll_wait(&events, -1);
if (ret < 0) {
restart:
ret = lttng_poll_wait(&events, -1);
if (ret < 0) {
DBG("Relay new connection received");
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
DBG("Relay new connection received");
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
- /* Zeroed the events structure */
- lttng_poll_reset(&events);
-
- nb_fd = LTTNG_POLL_GETNB(&events);
-
/* Infinite blocking call, waiting for transmission */
restart:
DBG3("Relayd worker thread polling...");
/* Infinite blocking call, waiting for transmission */
restart:
DBG3("Relayd worker thread polling...");
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
- nb_fd = LTTNG_POLL_GETNB(&events);
-
- DBG("Thread kernel polling on %d fds", nb_fd);
-
- /* Zeroed the poll events */
- lttng_poll_reset(&events);
+ DBG("Thread kernel polling on %d fds", events.nb_fd);
/* Poll infinite value of time */
restart:
/* Poll infinite value of time */
restart:
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
- nb_fd = LTTNG_POLL_GETNB(&events);
-
health_code_update(&consumer_data->health);
/* Inifinite blocking call, waiting for transmission */
health_code_update(&consumer_data->health);
/* Inifinite blocking call, waiting for transmission */
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
health_code_update(&consumer_data->health);
health_code_update(&consumer_data->health);
- /* Update number of fd */
- nb_fd = LTTNG_POLL_GETNB(&events);
-
/* Inifinite blocking call, waiting for transmission */
restart_poll:
health_poll_update(&consumer_data->health);
/* Inifinite blocking call, waiting for transmission */
restart_poll:
health_poll_update(&consumer_data->health);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
health_code_update(&health_thread_app_manage);
while (1) {
health_code_update(&health_thread_app_manage);
while (1) {
- /* Zeroed the events structure */
- lttng_poll_reset(&events);
-
- nb_fd = LTTNG_POLL_GETNB(&events);
-
- DBG("Apps thread polling on %d fds", nb_fd);
+ DBG("Apps thread polling on %d fds", events.nb_fd);
/* Inifinite blocking call, waiting for transmission */
restart:
/* Inifinite blocking call, waiting for transmission */
restart:
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
while (1) {
DBG("Accepting application registration");
while (1) {
DBG("Accepting application registration");
- nb_fd = LTTNG_POLL_GETNB(&events);
-
/* Inifinite blocking call, waiting for transmission */
restart:
health_poll_update(&health_thread_app_reg);
/* Inifinite blocking call, waiting for transmission */
restart:
health_poll_update(&health_thread_app_reg);
for (i = 0; i < nb_fd; i++) {
health_code_update(&health_thread_app_reg);
for (i = 0; i < nb_fd; i++) {
health_code_update(&health_thread_app_reg);
while (1) {
DBG("Health check ready");
while (1) {
DBG("Health check ready");
- nb_fd = LTTNG_POLL_GETNB(&events);
-
/* Inifinite blocking call, waiting for transmission */
restart:
ret = lttng_poll_wait(&events, -1);
/* Inifinite blocking call, waiting for transmission */
restart:
ret = lttng_poll_wait(&events, -1);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
while (1) {
DBG("Accepting client command ...");
while (1) {
DBG("Accepting client command ...");
- nb_fd = LTTNG_POLL_GETNB(&events);
-
/* Inifinite blocking call, waiting for transmission */
restart:
health_poll_update(&health_thread_cmd);
/* Inifinite blocking call, waiting for transmission */
restart:
health_poll_update(&health_thread_cmd);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
DBG("Metadata main loop started");
while (1) {
DBG("Metadata main loop started");
while (1) {
- lttng_poll_reset(&events);
-
- nb_fd = LTTNG_POLL_GETNB(&events);
-
/* Only the metadata pipe is set */
/* Only the metadata pipe is set */
- if (nb_fd == 0 && consumer_quit == 1) {
+ if (events.nb_fd == 0 && consumer_quit == 1) {
- DBG("Metadata poll wait with %d fd(s)", nb_fd);
+ DBG("Metadata poll wait with %d fd(s)", events.nb_fd);
ret = lttng_poll_wait(&events, -1);
DBG("Metadata event catched in thread");
if (ret < 0) {
ret = lttng_poll_wait(&events, -1);
DBG("Metadata event catched in thread");
if (ret < 0) {
/* From here, the event is a metadata wait fd */
for (i = 0; i < nb_fd; i++) {
revents = LTTNG_POLL_GETEV(&events, i);
/* From here, the event is a metadata wait fd */
for (i = 0; i < nb_fd; i++) {
revents = LTTNG_POLL_GETEV(&events, i);