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

Re: [Minios-devel] [UNIKRAFT v2 6/8] lib/nolibc: Move time.c to lib/uktime



Reviewed-by: Roxana Nicolescu <nicolescu.roxana1996@xxxxxxxxx>

On 04.10.2019 10:51, Costin Lupu wrote:
There are 2 files time.c with duplicated code in nolibc and newlib, with minor
differences. Therefore it makes more sense to move it in a common time-related
library.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
  lib/nolibc/Makefile.uk        |  1 -
  lib/nolibc/exportsyms.uk      | 10 ----------
  lib/uktime/Makefile.uk        |  1 +
  lib/uktime/exportsyms.uk      |  4 ++++
  lib/{nolibc => uktime}/time.c |  0
  5 files changed, 5 insertions(+), 11 deletions(-)
  rename lib/{nolibc => uktime}/time.c (100%)

diff --git a/lib/nolibc/Makefile.uk b/lib/nolibc/Makefile.uk
index 45f0b0fc..7cb2e7d1 100644
--- a/lib/nolibc/Makefile.uk
+++ b/lib/nolibc/Makefile.uk
@@ -33,7 +33,6 @@ LIBNOLIBC_SRCS-y += $(LIBNOLIBC_BASE)/string.c
  LIBNOLIBC_SRCS-y += $(LIBNOLIBC_BASE)/getopt.c
  LIBNOLIBC_SRCS-y += $(LIBNOLIBC_BASE)/sscanf.c
  LIBNOLIBC_SRCS-y += $(LIBNOLIBC_BASE)/asprintf.c
-LIBNOLIBC_SRCS-y += $(LIBNOLIBC_BASE)/time.c
  LIBNOLIBC_SRCS-$(CONFIG_LIBUKALLOC) += $(LIBNOLIBC_BASE)/malloc.c
# Localize internal symbols (starting with __*)
diff --git a/lib/nolibc/exportsyms.uk b/lib/nolibc/exportsyms.uk
index c542f3a6..675dadc1 100644
--- a/lib/nolibc/exportsyms.uk
+++ b/lib/nolibc/exportsyms.uk
@@ -72,16 +72,6 @@ strlcat
  strerror_r
  strerror
-# time
-nanosleep
-clock_gettime
-
-# unistd
-sleep
-
-# sys/time
-gettimeofday
-
  # ctype
  _nolibc_ctype
diff --git a/lib/uktime/Makefile.uk b/lib/uktime/Makefile.uk
index a1bee0a2..47fbb4b3 100644
--- a/lib/uktime/Makefile.uk
+++ b/lib/uktime/Makefile.uk
@@ -10,3 +10,4 @@ LIBUKTIME_SRCS-y += 
$(LIBUKTIME_BASE)/musl-imported/src/__secs_to_tm.c
  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
diff --git a/lib/uktime/exportsyms.uk b/lib/uktime/exportsyms.uk
index a00d1601..3c17d35a 100644
--- a/lib/uktime/exportsyms.uk
+++ b/lib/uktime/exportsyms.uk
@@ -1 +1,5 @@
+clock_gettime
+gettimeofday
+nanosleep
+sleep
  timegm
diff --git a/lib/nolibc/time.c b/lib/uktime/time.c
similarity index 100%
rename from lib/nolibc/time.c
rename to lib/uktime/time.c

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