Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
xenomai
Commits
807d07b3
Commit
807d07b3
authored
Feb 12, 2018
by
Philippe Gerum
Browse files
lib/cobalt: add clock_adjtime() syscall
parent
817b9b14
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/cobalt/time.h
View file @
807d07b3
...
...
@@ -39,6 +39,9 @@ COBALT_DECL(int, clock_gettime(clockid_t clock_id,
COBALT_DECL
(
int
,
clock_settime
(
clockid_t
clock_id
,
const
struct
timespec
*
tp
));
COBALT_DECL
(
int
,
clock_adjtime
(
clockid_t
clock_id
,
struct
timex
*
tx
));
COBALT_DECL
(
int
,
clock_nanosleep
(
clockid_t
clock_id
,
int
flags
,
const
struct
timespec
*
rqtp
,
...
...
lib/cobalt/clock.c
View file @
807d07b3
...
...
@@ -246,6 +246,21 @@ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp))
return
0
;
}
/* @apitags{unrestricted} */
COBALT_IMPL
(
int
,
clock_adjtime
,
(
clockid_t
clock_id
,
struct
timex
*
tx
))
{
int
ret
;
ret
=
-
XENOMAI_SYSCALL2
(
sc_cobalt_clock_adjtime
,
clock_id
,
tx
);
if
(
ret
<
0
)
{
errno
=
ret
;
return
-
1
;
}
return
ret
;
}
/**
* Sleep some amount of time.
*
...
...
lib/cobalt/cobalt.wrappers
View file @
807d07b3
...
...
@@ -25,6 +25,7 @@
--wrap clock_getres
--wrap clock_gettime
--wrap clock_settime
--wrap clock_adjtime
--wrap clock_nanosleep
--wrap nanosleep
--wrap pthread_mutex_init
...
...
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