From: Erik van der Kouwe Date: Fri, 20 Aug 2010 18:43:56 +0000 (+0000) Subject: move rrrrrrread_tsc from libsys to libc so anyone can use it X-Git-Tag: v3.1.8~62 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=b337d3f8e500b98843ca53f26eeafb222802d25d;p=minix.git move rrrrrrread_tsc from libsys to libc so anyone can use it --- diff --git a/include/minix/minlib.h b/include/minix/minlib.h index b123e5f7d..faf69353e 100644 --- a/include/minix/minlib.h +++ b/include/minix/minlib.h @@ -21,6 +21,10 @@ _PROTOTYPE(int rewrite_mtab, (char *_prog_name)); _PROTOTYPE(int get_mtab_entry, (char *_s1, char *_s2, char *_s3, char *_s4)); _PROTOTYPE(int put_mtab_entry, (char *_s1, char *_s2, char *_s3, char *_s4)); +/* read_tsc() and friends */ +_PROTOTYPE(void read_tsc, (u32_t *hi, u32_t *lo)); +_PROTOTYPE(void read_tsc_64, (u64_t *t)); + /* return values for fsversion */ #define FSVERSION_MFS1 0x00001 #define FSVERSION_MFS2 0x00002 diff --git a/include/minix/sysutil.h b/include/minix/sysutil.h index 9316ec627..20ec899de 100644 --- a/include/minix/sysutil.h +++ b/include/minix/sysutil.h @@ -87,9 +87,5 @@ struct util_timingdata { typedef struct util_timingdata util_timingdata_t; -/* read_tsc() and friends. */ -_PROTOTYPE( void read_tsc_64, (u64_t *t) ); -_PROTOTYPE( void read_tsc, (u32_t *hi, u32_t *lo) ); - #endif /* _MINIX_SYSUTIL_H */ diff --git a/lib/libc/other/Makefile.inc b/lib/libc/other/Makefile.inc index 2433397cf..8f18fb62a 100644 --- a/lib/libc/other/Makefile.inc +++ b/lib/libc/other/Makefile.inc @@ -86,6 +86,8 @@ SRCS+= \ putw.c \ pwcache.c \ random.c \ + read_tsc.S \ + read_tsc_64.c \ realpath.c \ rindex.c \ rlimit.c \ diff --git a/lib/libsys/read_tsc.S b/lib/libc/other/read_tsc.S similarity index 100% rename from lib/libsys/read_tsc.S rename to lib/libc/other/read_tsc.S diff --git a/lib/libsys/read_tsc_64.c b/lib/libc/other/read_tsc_64.c similarity index 71% rename from lib/libsys/read_tsc_64.c rename to lib/libc/other/read_tsc_64.c index e13ef1ba9..63faa10ad 100644 --- a/lib/libsys/read_tsc_64.c +++ b/lib/libc/other/read_tsc_64.c @@ -1,12 +1,11 @@ -#include "sysutil.h" #include -#include +#include /* Utility function to work directly with u64_t * By Antonio Mancina */ -PUBLIC void read_tsc_64(t) +void read_tsc_64(t) u64_t* t; { u32_t lo, hi; diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index a4c1dfab2..7469515e4 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -112,8 +112,6 @@ SRCS= \ env_prefix.c \ fkey_ctl.c \ tsc_util.c \ - read_tsc.S \ - read_tsc_64.c \ ser_putc.c \ stacktrace.c \ sys_hz.c \