projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quit menu complete
[lttv.git]
/
ltt
/
branches
/
poly
/
include
/
ltt
/
ltt.h
diff --git
a/ltt/branches/poly/include/ltt/ltt.h
b/ltt/branches/poly/include/ltt/ltt.h
index fc00a14d78888728966de71933f30437c0496674..74cbacebacbf6d3686e0117e179b421cb6d0473a 100644
(file)
--- a/
ltt/branches/poly/include/ltt/ltt.h
+++ b/
ltt/branches/poly/include/ltt/ltt.h
@@
-82,6
+82,13
@@
typedef struct _LttTime {
typedef uint64_t LttCycleCount;
typedef uint64_t LttCycleCount;
+#define NANSECOND_CONST 1000000000
+
+/* Event positions are used to seek within a tracefile based on
+ the block number and event position within the block. */
+
+typedef struct _LttEventPosition LttEventPosition;
+
/* Differences between architectures include word sizes, endianess,
alignment, floating point format and calling conventions. For a
/* Differences between architectures include word sizes, endianess,
alignment, floating point format and calling conventions. For a
@@
-103,11
+110,14
@@
typedef enum _LttArchEndian
do \
{\
(T3).tv_sec = (T2).tv_sec - (T1).tv_sec; \
do \
{\
(T3).tv_sec = (T2).tv_sec - (T1).tv_sec; \
- (T3).tv_nsec = (T2).tv_nsec - (T1).tv_nsec; \
- if((T3).tv_nsec < 0)\
+ if((T2).tv_nsec < (T1).tv_nsec)\
{\
(T3).tv_sec--;\
{\
(T3).tv_sec--;\
- (T3).tv_nsec += 1000000000;\
+ (T3).tv_nsec = NANSECOND_CONST - (T1).tv_nsec + (T2).tv_nsec;\
+ }\
+ else\
+ {\
+ (T3).tv_nsec = (T2).tv_nsec - (T1).tv_nsec;\
}\
} while(0)
}\
} while(0)
@@
-117,10
+127,10
@@
do \
{\
(T3).tv_sec = (T2).tv_sec + (T1).tv_sec; \
(T3).tv_nsec = (T2).tv_nsec + (T1).tv_nsec; \
{\
(T3).tv_sec = (T2).tv_sec + (T1).tv_sec; \
(T3).tv_nsec = (T2).tv_nsec + (T1).tv_nsec; \
- if((T3).tv_nsec >=
1000000000
)\
+ if((T3).tv_nsec >=
NANSECOND_CONST
)\
{\
{\
- (T3).tv_sec += (T3).tv_nsec /
1000000000
;\
- (T3).tv_nsec = (T3).tv_nsec %
1000000000
;\
+ (T3).tv_sec += (T3).tv_nsec /
NANSECOND_CONST
;\
+ (T3).tv_nsec = (T3).tv_nsec %
NANSECOND_CONST
;\
}\
} while(0)
}\
} while(0)
@@
-133,10
+143,10
@@
do \
{\
(T2).tv_sec = (T1).tv_sec * (FLOAT); \
(T2).tv_nsec = (T1).tv_nsec * (FLOAT); \
{\
(T2).tv_sec = (T1).tv_sec * (FLOAT); \
(T2).tv_nsec = (T1).tv_nsec * (FLOAT); \
- if((T2).tv_nsec >=
1000000000
)\
+ if((T2).tv_nsec >=
NANSECOND_CONST
)\
{\
{\
- (T2).tv_sec += (T
3).tv_nsec / 1000000000
;\
- (T2).tv_nsec = (T
3).tv_nsec % 1000000000
;\
+ (T2).tv_sec += (T
2).tv_nsec / NANSECOND_CONST
;\
+ (T2).tv_nsec = (T
2).tv_nsec % NANSECOND_CONST
;\
}\
} while(0)
}\
} while(0)
This page took
0.043843 seconds
and
4
git commands to generate.