[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v2 1/3] lib/uktime: Introduce POSIX timer stubs
We simply introduce the stubs for these functions. They will have to be implemented later, therefore we do not add any license for now. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- lib/uktime/Makefile.uk | 1 + lib/uktime/exportsyms.uk | 5 +++++ lib/uktime/timer.c | 46 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 lib/uktime/timer.c diff --git a/lib/uktime/Makefile.uk b/lib/uktime/Makefile.uk index 47fbb4b3..2976a10f 100644 --- a/lib/uktime/Makefile.uk +++ b/lib/uktime/Makefile.uk @@ -11,3 +11,4 @@ LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/musl-imported/src/timegm.c LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/musl-imported/src/__tm_to_secs.c LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/musl-imported/src/__year_to_secs.c LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/time.c +LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/timer.c diff --git a/lib/uktime/exportsyms.uk b/lib/uktime/exportsyms.uk index bd9c49cf..82b70b7f 100644 --- a/lib/uktime/exportsyms.uk +++ b/lib/uktime/exportsyms.uk @@ -9,3 +9,8 @@ timegm times usleep utime +timer_create +timer_delete +timer_settime +timer_gettime +timer_getoverrun diff --git a/lib/uktime/timer.c b/lib/uktime/timer.c new file mode 100644 index 00000000..63068478 --- /dev/null +++ b/lib/uktime/timer.c @@ -0,0 +1,46 @@ +#include <errno.h> +#include <time.h> +#include <uk/essentials.h> +#include <uk/print.h> + + +int timer_create(clockid_t clockid __unused, + struct sigevent *__restrict sevp __unused, + timer_t *__restrict timerid __unused) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} + +int timer_delete(timer_t timerid __unused) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} + +int timer_settime(timer_t timerid __unused, + int flags __unused, + const struct itimerspec *__restrict new_value __unused, + struct itimerspec *__restrict old_value __unused) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} + +int timer_gettime(timer_t timerid __unused, + struct itimerspec *curr_value __unused) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} + +int timer_getoverrun(timer_t timerid __unused) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |