projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: Fix: `wait_on_file()` returns too early
[lttng-tools.git]
/
tests
/
regression
/
kernel
/
select_poll_epoll.c
diff --git
a/tests/regression/kernel/select_poll_epoll.c
b/tests/regression/kernel/select_poll_epoll.c
index 08e7fce0d898df547da42e371dc694f90bea4141..33b8cb5d5d100d29ac18777ba68ae996e1ced057 100644
(file)
--- a/
tests/regression/kernel/select_poll_epoll.c
+++ b/
tests/regression/kernel/select_poll_epoll.c
@@
-1,3
+1,10
@@
+/*
+ * Copyright (C) 2016 Julien Desfossez <jdesfossez@efficios.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ */
+
#include <stdio.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
#include <poll.h>
#include <signal.h>
@@
-31,7
+38,7
@@
#define MSEC_PER_NSEC (MSEC_PER_USEC * 1000)
static int timeout; /* seconds, -1 to disable */
#define MSEC_PER_NSEC (MSEC_PER_USEC * 1000)
static int timeout; /* seconds, -1 to disable */
-
volatile static
int stop_thread;
+
static volatile
int stop_thread;
static int wait_fd;
struct ppoll_thread_data {
static int wait_fd;
struct ppoll_thread_data {
@@
-732,6
+739,9
@@
void epoll_pwait_concurrent_munmap(void)
struct epoll_event *epoll_event;
pthread_t writer;
struct epoll_event *epoll_event;
pthread_t writer;
+ for (i = 0; i < MAX_FDS; i++) {
+ fds[i] = -1;
+ }
epollfd = epoll_create(MAX_FDS);
if (epollfd < 0) {
perror("[eppoll] create");
epollfd = epoll_create(MAX_FDS);
if (epollfd < 0) {
perror("[eppoll] create");
This page took
0.037636 seconds
and
5
git commands to generate.