summaryrefslogtreecommitdiff
path: root/rts/eventlog
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-19 12:49:32 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-19 12:49:32 +0000
commitc14119ce2639d4e4c868f3d1c9bb59bd3a2dd281 (patch)
tree09fcf81600c7156f64ecbcc79d2d0e0ab0efac0c /rts/eventlog
parentebb1d38825c6eafeb1e1ff9885b1557e7d065e49 (diff)
downloadhaskell-c14119ce2639d4e4c868f3d1c9bb59bd3a2dd281.tar.gz
Fix warnings with older versions of gcc (3.4.5)
Diffstat (limited to 'rts/eventlog')
-rw-r--r--rts/eventlog/EventLog.c99
1 files changed, 44 insertions, 55 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index 8e74215dbb..820e95cef1 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -78,17 +78,50 @@ static void postEventType(EventsBuf *eb, EventType *et);
static StgBool hasRoomForEvent(EventsBuf *eb, EventTypeNum eNum);
-static inline void postInt8(EventsBuf *eb, StgInt8 i);
-static inline void postInt16(EventsBuf *eb, StgInt16 i);
-static inline void postInt32(EventsBuf *eb, StgInt32 i);
-static inline void postInt64(EventsBuf *eb, StgInt64 i);
-static inline void postWord8(EventsBuf *eb, StgWord8 i);
-static inline void postWord16(EventsBuf *eb, StgWord16 i);
-static inline void postWord32(EventsBuf *eb, StgWord32 i);
-static inline void postWord64(EventsBuf *eb, StgWord64 i);
-
-static inline void postEventTypeNum(EventsBuf *eb, EventTypeNum etNum);
-static inline void postTimestamp(EventsBuf *eb, Timestamp t);
+static inline void postWord8(EventsBuf *eb, StgWord8 i)
+{
+ *(eb->pos++) = i;
+}
+
+static inline void postWord16(EventsBuf *eb, StgWord16 i)
+{
+ postWord8(eb, (StgWord8)(i >> 8));
+ postWord8(eb, (StgWord8)i);
+}
+
+static inline void postWord32(EventsBuf *eb, StgWord32 i)
+{
+ postWord16(eb, (StgWord16)(i >> 16));
+ postWord16(eb, (StgWord16)i);
+}
+
+static inline void postWord64(EventsBuf *eb, StgWord64 i)
+{
+ postWord32(eb, (StgWord32)(i >> 32));
+ postWord32(eb, (StgWord32)i);
+}
+
+static inline void postEventTypeNum(EventsBuf *eb, EventTypeNum etNum)
+{ postWord16(eb, etNum); }
+
+static inline void postEventTypeID(EventsBuf *eb, StgWord16 etID)
+{ postWord16(eb, etID); }
+
+static inline void postTimestamp(EventsBuf *eb, Timestamp t)
+{ postWord64(eb,t); }
+
+static inline void postInt8(EventsBuf *eb, StgInt8 i)
+{ postWord8(eb, (StgWord8)i); }
+
+static inline void postInt16(EventsBuf *eb, StgInt16 i)
+{ postWord16(eb, (StgWord16)i); }
+
+static inline void postInt32(EventsBuf *eb, StgInt32 i)
+{ postWord32(eb, (StgWord32)i); }
+
+static inline void postInt64(EventsBuf *eb, StgInt64 i)
+{ postWord64(eb, (StgWord64)i); }
+
void
initEventLogging(void)
@@ -420,48 +453,4 @@ static void postEventType(EventsBuf *eb, EventType *et)
postInt32(eb, EVENT_ET_END);
}
-static inline void postEventTypeNum(EventsBuf *eb, EventTypeNum etNum)
-{ postWord16(eb, etNum); }
-
-static inline void postEventTypeID(EventsBuf *eb, StgWord16 etID)
-{ postWord16(eb, etID); }
-
-static inline void postTimestamp(EventsBuf *eb, Timestamp t)
-{ postWord64(eb,t); }
-
-static inline void postInt8(EventsBuf *eb, StgInt8 i)
-{ postWord8(eb, (StgWord8)i); }
-
-static inline void postInt16(EventsBuf *eb, StgInt16 i)
-{ postWord16(eb, (StgWord16)i); }
-
-static inline void postInt32(EventsBuf *eb, StgInt32 i)
-{ postWord32(eb, (StgWord32)i); }
-
-static inline void postInt64(EventsBuf *eb, StgInt64 i)
-{ postWord64(eb, (StgWord64)i); }
-
-static inline void postWord8(EventsBuf *eb, StgWord8 i)
-{
- *(eb->pos++) = i;
-}
-
-static inline void postWord16(EventsBuf *eb, StgWord16 i)
-{
- postWord8(eb, (StgWord8)(i >> 8));
- postWord8(eb, (StgWord8)i);
-}
-
-static inline void postWord32(EventsBuf *eb, StgWord32 i)
-{
- postWord16(eb, (StgWord16)(i >> 16));
- postWord16(eb, (StgWord16)i);
-}
-
-static inline void postWord64(EventsBuf *eb, StgWord64 i)
-{
- postWord32(eb, (StgWord32)(i >> 32));
- postWord32(eb, (StgWord32)i);
-}
-
#endif /* EVENTLOG */