Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
39fc5e7a
Commit
39fc5e7a
authored
Sep 08, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation error
parent
8228e1cf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
packet-exchange/src/client.c
packet-exchange/src/client.c
+0
-2
packet-exchange/src/common.c
packet-exchange/src/common.c
+15
-2
No files found.
packet-exchange/src/client.c
View file @
39fc5e7a
...
@@ -89,8 +89,6 @@ static enum TSNTask tsn_task;
...
@@ -89,8 +89,6 @@ static enum TSNTask tsn_task;
static
struct
timespec
measures_start
;
static
struct
timespec
measures_start
;
static
struct
timespec
measures_end
;
static
struct
timespec
measures_end
;
static
char
send_data
[
MAX_BUFFER_SIZE
];
static
char
send_data
[
MAX_BUFFER_SIZE
];
static
int
latency_target_fd
=
-
1
;
static
int32_t
latency_target_value
=
0
;
static
void
help
(
char
*
argv
[])
{
static
void
help
(
char
*
argv
[])
{
printf
(
printf
(
...
...
packet-exchange/src/common.c
View file @
39fc5e7a
#define _GNU_SOURCE
#define _GNU_SOURCE
#include "common.h"
#include "common.h"
#include <errno.h>
#include <error.h>
#include <fcntl.h>
#include <inttypes.h>
#include <inttypes.h>
#include <limits.h>
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <signal.h>
#include <stdint.h>
#include <stdint.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <time.h>
#include <unistd.h>
#include <unistd.h>
static
int
latency_target_fd
=
-
1
;
static
int32_t
latency_target_value
=
0
;
void
(
*
previous_handlers
[
NSIG
])(
int
);
void
(
*
previous_handlers
[
NSIG
])(
int
);
static
void
(
*
sighand
)(
int
);
static
void
(
*
sighand
)(
int
);
...
@@ -64,7 +77,7 @@ void set_latency_target(void) {
...
@@ -64,7 +77,7 @@ void set_latency_target(void) {
void
add_ns
(
struct
timespec
*
t
,
uint64_t
ns
)
{
void
add_ns
(
struct
timespec
*
t
,
uint64_t
ns
)
{
t
->
tv_nsec
+=
ns
;
t
->
tv_nsec
+=
ns
;
while
(
t
->
tv_nsec
>=
((
int64_t
)
NSEC_PER_SEC
))
{
while
(
t
->
tv_nsec
>=
((
int64_t
)
NSEC_PER_SEC
))
{
t
->
tv_sec
+=
1
;
t
->
tv_sec
+=
1
;
t
->
tv_nsec
-=
NSEC_PER_SEC
;
t
->
tv_nsec
-=
NSEC_PER_SEC
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment