systm-h-header-inclusion-20060227
[openafs.git] / src / rx / rx_clock.h
index 46ed6f5..6b13f79 100644 (file)
 #define _CLOCK_
 
 #ifdef KERNEL
-#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
 #include "h/systm.h"
 #include "h/time.h"
-#endif /* System V */
+#endif /* System V */
 #else /* KERNEL */
 #ifndef AFS_NT40_ENV
 #ifndef ITIMER_REAL
@@ -38,8 +38,8 @@
 
 /* A clock value is the number of seconds and microseconds that have elapsed since calling clock_Init. */
 struct clock {
-    afs_int32 sec;         /* Seconds since clock_Init */
-    afs_int32 usec;        /* Microseconds since clock_Init */
+    afs_int32 sec;             /* Seconds since clock_Init */
+    afs_int32 usec;            /* Microseconds since clock_Init */
 };
 
 #ifndef        KERNEL
@@ -99,24 +99,17 @@ extern int clock_nUpdates;
        (cv)->usec = (afs_int32)tv.tv_usec;             \
     END
 #else /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
-#define clock_GetTime(cv) osi_GetTime((struct timeval *)cv)
+#define clock_GetTime(cv) osi_GetTime((osi_timeval_t *)(cv))
 #endif /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
 #endif
 #define clock_Sec() osi_Time()
-#define        clock_NewTime()    /* don't do anything; clock is fast enough in kernel */
+#define        clock_NewTime()         /* don't do anything; clock is fast enough in kernel */
 #endif /* KERNEL */
 
 /* Returns the elapsed time in milliseconds between clock values (*cv1) and (*cv2) */
 #define clock_ElapsedTime(cv1, cv2) \
     (((cv2)->sec - (cv1)->sec)*1000 + ((cv2)->usec - (cv1)->usec)/1000)
 
-#ifdef AFS_PTHREAD_ENV
-#define clock_Advance(cv)
-#else
-/* Advance the known value of the current clock time (clock_now) by the specified clock value */
-#define clock_Advance(cv) clock_Add(&clock_now, cv)
-#endif /* AFS_PTHREAD_ENV */
-
 /* Some comparison operators for clock values */
 #define        clock_Gt(a, b)  ((a)->sec>(b)->sec || ((a)->sec==(b)->sec && (a)->usec>(b)->usec))
 #define        clock_Ge(a, b)  ((a)->sec>(b)->sec || ((a)->sec==(b)->sec && (a)->usec>=(b)->usec))