diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-07-08 06:47:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-07-08 06:47:53 +0000 |
commit | da48cd782fafade16e1894fe18915a2e8ad97ad2 (patch) | |
tree | 6c8a993047c171306e96e0385b51c111aeb71f8d | |
parent | ae58a106a1fd583433f8505af38fbc0af554bf39 (diff) | |
download | glibc-da48cd782fafade16e1894fe18915a2e8ad97ad2.tar glibc-da48cd782fafade16e1894fe18915a2e8ad97ad2.tar.gz glibc-da48cd782fafade16e1894fe18915a2e8ad97ad2.tar.bz2 glibc-da48cd782fafade16e1894fe18915a2e8ad97ad2.zip |
(__gettimeofday): Add declarations for asm functions.
-rw-r--r-- | sysdeps/unix/sysv/aix/gettimeofday.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index c7a4a01c08..031a84ebb6 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -21,11 +21,14 @@ #include <sys/time.h> #ifndef HAVE_GNU_LD -#define __daylight daylight -#define __timezone timezone -#define __tzname tzname +# define __daylight daylight +# define __timezone timezone +# define __tzname tzname #endif +extern int rtc_upper (void); +extern int rtc_lower (void); + /* Assembler Routines to access the timer registers */ asm(" .rtc_upper: mfspr 3,4 # copy RTCU to return register @@ -51,14 +54,14 @@ __gettimeofday (tv, tz) return -1; } - ts = rtc_upper(); /* seconds */ - tl = rtc_lower(); /* nanoseconds */ - tu = rtc_upper(); /* Check for a carry from */ - if (ts != tu) /* the lower reg to the upper */ - tl = rtc_lower(); /* Recover from the race condition */ + ts = rtc_upper (); /* Seconds. */ + tl = rtc_lower (); /* Nanoseconds. */ + tu = rtc_upper (); /* Check for a carry from. */ + if (ts != tu) /* The lower reg to the upper. */ + tl = rtc_lower (); /* Recover from the race condition. */ - tv->tv_sec = (long int) (tu + (double)tl/1000000000); - tv->tv_usec = (long int) ((double)tl/1000); + tv->tv_sec = (long int) (tu + (double) tl / 1000000000); + tv->tv_usec = (long int) ((double) tl / 1000); if (tz != NULL) { |