projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add FreeBSD compat layer for splice and sync_file_range
[lttng-tools.git]
/
src
/
common
/
kernel-consumer
/
kernel-consumer.c
diff --git
a/src/common/kernel-consumer/kernel-consumer.c
b/src/common/kernel-consumer/kernel-consumer.c
index 3489ab6ed866970eec6915701ffef029d27d6c36..f32f47b3eeb1f6faf6b615700529dea5e990c7e5 100644
(file)
--- a/
src/common/kernel-consumer/kernel-consumer.c
+++ b/
src/common/kernel-consumer/kernel-consumer.c
@@
-19,7
+19,6
@@
#define _GNU_SOURCE
#include <assert.h>
#define _GNU_SOURCE
#include <assert.h>
-#include <fcntl.h>
#include <poll.h>
#include <pthread.h>
#include <stdlib.h>
#include <poll.h>
#include <pthread.h>
#include <stdlib.h>
@@
-28,10
+27,12
@@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
+#include <sys/stat.h>
#include <common/common.h>
#include <common/kernel-ctl/kernel-ctl.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/common.h>
#include <common/kernel-ctl/kernel-ctl.h>
#include <common/sessiond-comm/sessiond-comm.h>
+#include <common/compat/fcntl.h>
#include "kernel-consumer.h"
#include "kernel-consumer.h"
@@
-72,7
+73,7
@@
int lttng_kconsumer_on_read_subbuffer_mmap(
goto end;
}
/* This won't block, but will start writeout asynchronously */
goto end;
}
/* This won't block, but will start writeout asynchronously */
- sync_file_range(outfd, stream->out_fd_offset, ret,
+
lttng_
sync_file_range(outfd, stream->out_fd_offset, ret,
SYNC_FILE_RANGE_WRITE);
stream->out_fd_offset += ret;
}
SYNC_FILE_RANGE_WRITE);
stream->out_fd_offset += ret;
}
@@
-122,7
+123,7
@@
int lttng_kconsumer_on_read_subbuffer_splice(
}
len -= ret;
/* This won't block, but will start writeout asynchronously */
}
len -= ret;
/* This won't block, but will start writeout asynchronously */
- sync_file_range(outfd, stream->out_fd_offset, ret,
+
lttng_
sync_file_range(outfd, stream->out_fd_offset, ret,
SYNC_FILE_RANGE_WRITE);
stream->out_fd_offset += ret;
}
SYNC_FILE_RANGE_WRITE);
stream->out_fd_offset += ret;
}
This page took
0.024516 seconds
and
4
git commands to generate.