fix GET_HOOK_ID
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 21 Aug 2005 04:13:49 +0000 (04:13 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 21 Aug 2005 04:13:49 +0000 (04:13 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1039 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/ltt.h
ltt/branches/poly/lttv/lttv/hook.h

index 5154c05b0d1c78f0c0b121b4b4798b1ea95d1da8..02d937c24b003f787560ffdab2b0f57f2a8fe2d9 100644 (file)
@@ -68,6 +68,7 @@
    associated to the trace. */
    
 #define NUM_FACILITIES 256
+#define FACILITIES_BITS 8
 #define AVG_EVENTS_PER_FACILITIES 10
 
 typedef struct _LttTrace LttTrace;
index 90f50b0d54a462e99448c0879b1664a3694df552..197184a6d4ce9333be659c31ecb5a5408b0e0add 100644 (file)
@@ -130,7 +130,7 @@ typedef struct _LttvHooksById {
 
 /* macro to calculate the hook ID of a facility/event pair. */
 #define GET_HOOK_ID(fac_id, ev_id) \
-  ( (guint)fac_id | ((guint)ev_id << (8*sizeof(NUM_FACILITIES))) )
+  ( (guint)fac_id | ((guint)ev_id << FACILITIES_BITS) )
 
 /* Create and destroy a hooks by id list */
 
This page took 0.024824 seconds and 4 git commands to generate.