[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


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Tue, 17 Dec 2019 09:43:53 +0200
  • Cc: simon.kuenzer@xxxxxxxxx
  • Delivery-date: Tue, 17 Dec 2019 07:44:07 +0000
  • Ironport-sdr: O4GuLN2FrTNUouDhr54WFrLBkCqMZRFlELjruM4ipimspCng5nvFdmGs7UYJx7EAQx42dwYlxQ ab5aMrLj7wtA==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.