[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 1/3] lib/uktime: Introduce POSIX timer stubs



Other from a missing the license header in timer.c the patch looks, fine. Can you add the header?

Thanks,

Simon

On 17.12.19 08:43, Costin Lupu wrote:
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 @@

You should add our usual header.

+#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;
+}


_______________________________________________
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®.